You'll find some more information on the "copyrightability" of code snippets in Section 3 of the paper that Andreas mentioned in his blog post and on the corresponding slides:
https://empirical-software.engineering/assets/pdf/emse18-sni...
https://empirical-software.engineering/assets/pdf/icse19-sni...