Dinosaur Comics takes on a class of jokes insulting particular groups, and supplies some joke templates for them:
(Hat tip to Bruce Webster.)
Some readers will identify these most strongly with the rich vein of “lawyer jokes” that put lawyers down (“What’s the difference between a lawyer and an X?” and the like).
Note that when PROFESSION MEMBER is expanded to take in members of social groups, then T-Rex finds the jokes no longer “all in fun” (“just jokes”, as some people say), but instead sees them as X-ist, in particular racist.
Erin O’Connor has picked up this cartoon on the Snowclone Database, in an entry for 7/20/09, where she connects the joke templates to snowclones. Granted, they are both types of formulaic language (as are riddle templates, poetic forms, and much else), but I see them as significantly different. Templatic jokes and riddles (and so on) are routines embedded within larger texts — they are, in a sense, digressions — while snowclones, like idioms and clichés, are expressions fully integrated into their texts.
However, the lines are by no means clear, and there are many problematic cases (not all jokes are templatic, and there are short non-templatic digressions, like proverbs). There’s isn’t necessarily a bright line separating interruptive from fully integrated material.