There's an easy solution for this: Just generate a file called COPYING_ML which lists all the licenses used by each snippet of code.
You could have something like this:
  • A SHA256 hash of the snippet on one line,
  • and below it, the license text of the project taken from that hash.
That would solve all the problems related to attribution, and a lawsuit wouldn't be needed. It will also allow someone to easily identify GPL'ed snippets