The House originally passed this 1145-page bill (H.R.1540) back on May 26 by a vote of 322-96. Only six Republicans voted against the bill (Justin Amash, John Campbell, Jason Chaffetz, John Duncan, Tom McClintock, & Ron Paul).
The 926-page Senate version of the bill (S.1867) was passed on December 1 by a vote of 93-7. Only three Republicans voted against the bill (Tom Coburn, Mike Lee, & Rand Paul). The Senate then incorporated the measure in a now 908-page H.R.1540 as an amendment.
The original House bill contained an affirmation in section 1034 that the president has "the authority to detain belligerents," until "the termination of hostilities," including persons who "(A) are part of, or are substantially supporting, al-Qaeda, the Taliban, or associated forces that are engaged in hostilities against the United States or its coalition partners; or (B) have engaged in hostilities or have directly supported hostilities in aid of a nation, organization, or person described in subparagraph (A)."
But it is the Senate version that, as amended in two ways, raised such a firestorm of controversy.
Conservative, religious, and animal-rights groups were upset with a provision in the Senate bill seen as legalizing sodomy and bestiality in the military. The Senate bill simply says, buried in division A – DEPARTMENT OF DEFENSE AUTHORIZATIONS, title V – MILITARY PERSONNEL POLICY, subtitle E – Military Justice and Legal Matters Generally, section 551 – REFORM OF OFFENSES RELATING TO RAPE, SEXUAL ASSAULT, AND OTHER SEXUAL MISCONDUCT UNDER THE UNIFORM CODE OF MILITARY JUSTICE, (d) REPEAL OF SODOMY ARTICLE, that "Section 925 of such title (article 125 of the Uniform Code of Military Justice) is repealed." This is a reference to title 10, subtitle A, part II, chapter 47, subchapter 10, section 925 of U.S. Code, which states:
(a) Any person subject to this chapter who engages in unnatural carnal copulation with another person of the same or opposite sex or with an animal is guilty of sodomy. Penetration, however slight, is sufficient to complete the offense.
(b) Any person found guilty of sodomy shall by punished as a court-martial may direct.
Section 125 of the UCMJ adds this explanation:
It is unnatural carnal copulation for a person to take into that person’s mouth or anus the sexual organ of another person or of an animal; or to place that person’s sexual organ in the mouth or anus of another person or of an animal; or to have carnal copulation in any opening of the body, except the sexual parts, with another person; or to have carnal copulation with an animal.
The Senate bill also directed that the two other mentions of sodomy in U.S. Code title 10, subtitle A, part II, chapter 47, subchapter 8, section 843, and subchapter 10, section 918, be excised.