Humour can be a coping mechanism but it depends on both the style and occasion being used as well as the person. It seems aggressive humour attracts people with repressed negative feelings as much as it’s being used by those. Like they’re in a bad mood and can’t admit contempt or disgust so they ridicule at somebody and laugh at its expense. (It could be from personal experience not just with those people but also with myself to stave off something.)
Self-defeating humour, like aggressive humour, stems from being unable to let go of certain feelings. However instead of hiding bad feelings at others, it’s bad feelings about self. Self-enhanced and affiliative humour don’t necessarily entirely ward off bad feelings but can let go of them better. They needn’t to ridicule or sneer someone or something to make jokes, if only because they’ve let go of them at some point or another.
Several people can alternate between humour styles, most especially depending on the occasion and mood though one will use one style more often than the other. It could indicate the type of personality. So the research repeatedly does confirm it.