Frequently, Stack Overflow answers to JavaScript questions contain XSS vulnerabilities (or vulnerabilities of other kinds). For instance, this answer with 420 upvotes and a quarter of a million views to a question about decoding HTML entities is likely to cause an XSS vulnerability if used on untrusted input.
Given the popularity of the answer, we can safely assume that there are dozens - maybe hundreds or thousands - of websites using this vulnerable code snippet. Finding these is of interest to both blackhats (one of those sites might happen to be something worth hacking) and whitehats who would like to inform the owners of those applications about the vulnerability.
However, locating such websites is not a trivial problem. Google doesn't index JavaScript, so we can't simply Google for the snippet and find vulnerable sites. Searching GitHub finds some instances of the snippet being copied and pasted, but the source of most websites is not publicly hosted on GitHub. Spidering the entire internet myself and searching all the JavaScript on the web is, of course, a theoretical possibility - but not one that I (or most people) have the resources to do.
So what practical mechanism does a normal person have to search for places where a code snippet has been copied and pasted?