This may be an acceptable approach if the code is not produced in a professional context and not of professional quality. One of the keystones of open source is professionals have had an ecosystem where they can deliver value to an open forum but still have at least a semblance of control how their contribution is used via various licenses they can select.
Sounds a lot like Oracle's justification for owning the Java API ( https://en.wikipedia.org/wiki/Google_LLC_v._Oracle_America,_.... ) in which de minimis things like variable and structure declarations were used by Oracle to justify a copyright-maximal approach that would have utterly laid waste to open source development.
The code in question is not something that anyone needs to own. Rather, it's what anyone would write, faced with the same problem. It's stupid to make humans do a robot's job in the name of preserving meaningless "IP rights".
Takes practice, but it's a skill that can be mastered like any other.
reply