Mr. Humphreys’s aim was not just academic: he was trying to illustrate to the public and the police that straight men would not be harassed in these bathrooms. His findings would seem to suggest the implausibility not only of Senator Craig’s denial — that it was all a misunderstanding — but also of the policeman’s assertion that he was a passive participant. If the code was being followed, it is likely that both men would have to have been acting consciously for the signals to continue.

Mr. Humphreys broke down these transactions into phases, which are remarkably similar to the description of Senator Craig’s behavior given by the police. First is the approach: Mr. Craig allegedly peeks into the stall. Then comes positioning: he takes the stall next to the policeman. Signaling: Senator Craig allegedly taps his foot and touches it to the officer’s shoe, which was positioned close to the divider, then slides his hand along the bottom of the stall. There are more phases in Mr. Humphreys’s full lexicon — maneuvering, contracting, foreplay and payoff — but Mr. Craig was arrested after the officer presumed he had “signaled.”

Clearly, whatever Mr. Craig’s intentions, the police entrapped him. If the police officer hadn’t met his stare, answered that tap or done something overt, there would be no news story. On this point, Mr. Humphreys was adamant and explicit: “On the basis of extensive and systematic observation, I doubt the veracity of any person (detective or otherwise) who claims to have been ‘molested’ in such a setting without first having ‘given his consent.’ ”

As for those who feel that a family man and a conservative senator would be unlikely to engage in such acts, Mr. Humphreys’s research says otherwise. As a former Episcopal priest and closeted gay man himself, he was surprised when he interviewed his subjects to learn that most of them were married; their houses were just a little bit nicer than most, their yards better kept. They were well educated, worked longer hours, tended to be active in the church and the community but, unexpectedly, were usually politically and socially conservative, and quite vocal about it.

In other words, not only did these men have nice families, they had nice families who seemed to believe what the fathers loudly preached about the sanctity of marriage. Mr. Humphreys called this paradox “the breastplate of righteousness.” The more a man had to lose by having a secret life, the more he acquired the trappings of respectability: “His armor has a particularly shiny quality, a refulgence, which tends to blind the audience to certain of his practices. To others in his everyday world, he is not only normal but righteous — an exemplar of good behavior and right thinking.”