That's definitely a pita situation...
<-- also a teacher and would *NEVER* want to teach middle school - not because of the kids, but because the material is boring.
homework should never be a punishment.
(And, running laps for sports teams should never be punishment either... I've never figured out how coaches convince students that it's punishment, while kids on other teams (cross country) specialize in running laps. No wonder so many people grow up to hate running and wind up overweight. But, I digress)
Questions: Same kid being targeted? If so, you have a bullying problem. In that case, I'd go way out of my way to stop it.
And, if you can speak one-on-one with the kid being bullied, you'd probably be able to narrow down your list of suspects quite a bit. Regardless, it's often hard to get someone to be the "tattle-tale" - even on this forum, that seems to often be a popular opinion (and as such, I'm surprised no one has said "who cares" yet.) When I was an RA in college, someone ripped a bathroom stall out and threw it through a window at the end of the hall... someone axed down a door... thousands upon thousands of dollars in damage was caused by a very small number of students. The entire floor knew who did it; they made a pact to all agree not to tell me, because they knew the university would throw out those responsible. So, they split the costs. 20 years later, I wonder if they've ever regretted that choice.
One idea; I don't know if it would work or not: First, give them a lecture on bullying - there are some incredible resources, videos, etc. on this. Make sure that it's fairly emotional - make sure they realize what the real consequences can be. Give them a quiz at the end... Questions 1-4: whatever, just to get them to answer some simple questions. Then, "is it possible to stop being a bully without help?" And, "who put the gum on the seat?" (or something along those lines... you can probably come up with a better sequence of questions. But, turn the situation into a positive learning situation for the class if possible, rather than punishing everyone. (Although the punishing everyone would still work as an alternative, even if you tried this approach.)