Re: Really depends on the code generated, doesn't it?
I don't know what "every developer" does, but what I do is put in a comment with the URL where I found the code suggestion. Of course my code is always heavily refactored, because code from the internet is crap. Even when it comes from a good developer, at a minimum it's missing error handling. But even though the code is now "mine" (whatever that means), I still put the URL, sometimes more than one URL. Later anybody (it may even be me) who wants to compare my code with the internet code should be able to find it easily.