My company does not allow ANY copying of ANY source code without legal review. This is why. One little coder that uses someone else’s source code, even just a few lines, can cause major headaches. INtellectual Property rights is nothing to fool around with. A company can find someone else owns the profits if they do.
As a coder (mainly PHP), I usually get my information from various sites that offer code as a sample. The coder from Google could have gotten it from there.. I don’t know.