Basic Trope: A culprit (usually beneath suspicion) confesses to a crime under investigation, but does so sarcastically, and thus is not taken seriously.
Hank: But how did the killer exit the room without leaving a blood trail? James: Simple. He washed his hands in the flower vase. Hank: And how do you know so much about the killer's m.o., genius? James: I murdered her myself. She always talked too much, you know. Hank: Very funny. James turns out to be the killer in the end, for exactly the reason he stated.
Hank: But how did the killer exit the room without leaving a blood trail? James: Simple. He washed his hands in the flower vase. Hank: How do you know that? What, are you the killer or something? James: Oh, yes, Hank. I'm an unrepentant serial killer with 20 years of killing experience. This very night I broke into the study through a hidden passage behind the ancestral portrait, strangled Isabella with my bare hands, and to implicate her fiancee in the murder, I bought a machete two states away with a credit card registered in his name and had his fingerprints planted on it. And as soon as you leave this room, I plan to put that very same machete between your shoulder blades. I know I sound sarcastic right now, but honestly I'm telling you the truth. Hank: ...Stop being sarcastic, would you? We have work to do. And put that machete down...
James: We ought to be careful Hank. The killer could be anyone, even you or me. Hank: One of us, that's ridiculous.
Hank: James! It was you all along! But... when we were investigating... James: You thought I was being sarcastic, didn't you, Hank? Because you never listen to me, you never take me seriously, and you are so incredibly self-absorbed that you wouldn't so much as blink at me even if I confessed to being a murderer to your face!
Hank: How do you know this, James? Are you the killer? James: What??? You... you seriously think it was me? Hank: I was being sarcastic, James. James: An innocent woman is dead, Hank. Fine time for sarcasm.
Hank suspects James, so he makes a sarcastic accusation to throw him of the trail:
James: Who could have done this? Hank: It was you James! James: Me?! Hank: Yes you! James: Are you serious?! Hank: I was kidding James, lets find the killer.
James: Of course, Hank. I'm the killer. Hank: Wh-what? It... was you, James? James: Just joking, old friend. Now let's find the scoundrel who did this.
Hank: James! You're the killer? But... when you made the confession, you said that you were being sarcastic! James: The confession was honesty, Hank. Sarcasm was when I called you my friend.
Parodied: James is arrested and convicted of his crimes. At the trial, Hank is on the witness stand recalling the bloodstains, the unaccountable disappearances, and "that oddly detailed description of the murder he reported in a sarcastic tone of voice". James mutters "My one mistake."
Zig Zagged: James confesses sarcastically to Hank that he was the killer. Hank later uncovers evidence and realizes to his horror that James really was the killer. He shoots James dead. And then the real killer appears. Hank struggles with the killer and eventually kills him. And then Hank finds James' body missing, with a note from James thanking him for eliminating his accomplice, and thus the only witness to the murder.
Averted: Neither James nor Hank confesses or accuses the other.
Enforced: "Well, we've established James as such a Magnificent Bastard that if we just reveal that he is the killer, it'll look like an Ass Pull. What about that Red Herring in the dialogue?"
James: Of course, Hank. I'm the killer. Harry: I can never tell if you're being honest or sarcastic, James! James: I know.
Invoked: James has been blackmailed into working with the killer, and his sarcastic confession is a desperate attempt to steer Hank towards the truth without alerting the killer to his defection.
Defied: "And how do you know all that? Are you the killer, James? James? James, why are you bleeding all over the... James? JAMES!!!"
Discussed: "Case closed. Lesson learned? If your friend sarcastically gives you an accurate description of the murder, maybe you should at least consider him to be a suspect."
Hank: I can't piece this together, James. Give me something to work with. James: Any suggestions? Hank: Pretend you're secretly the murderer and you're sarcastically giving me information to throw off my suspicions. James: Sounds fun.
Deconstructed: James suffers from numerous psychoses, including a strong compulsion to be perfectly honest. Making confessions in a heavily sarcastic tone is the only way he can keep himself from having a breakdown. Years of this explains his haughty, condescending personality. As he explains to Hank, no completely sane man would explain the details of his greatest crimes, even sarcastically, for fear of being taken seriously.
Reconstructed: James likes sarcastically confessing to his crimes, as it allows him to feel superior to the idiots he spends all his time with.