if not is it because it is too small? what’s the minimum line number that ownership kicks into? what if I change the function name and the variable names?
I don't expect, or support, licensing that small amount of code, and suing everyone to oblivion.
The point I'm trying to make is if something is under a copyleft license, you can't copy and paste it verbatim to something non-copyleft. It's what the license says.
Also, to be pedantic, the function I'm commenting on is pure maths, and you can't license/patent mathematics.
On the other hand, if there's some magic sauce of doing something, let it be 25 lines, what will you say? It's just 25 lines, so you can't license it? To be more pedantic, I actually have an algorithm, which is around 25 lines and does something novel. I've published a paper on it.
If I license the reference implementation with AGPLv3+, and you use it and close it, and if I can't go after you, what's the purpose of the license?
You can read the paper and try to implement it. It's free in that regard.
Let's say I have 25 line function which does something novel and can be published as research (which I did, BTW, no joke), and I opened its reference implementation with AGPLv3+.
if you write it yourself, it's fine. if you directly copy it from somewhere you arent allowed to copy from, then it is wrong.
There are no rules about the form of the code itself that governs whether or not someone owns it. Common sense applies. Sure you could "steal" very small, common, code snippets and get away with it; but that doesnt make it less wrong.
When a commercial entity explicitly does it, however, some times we can catch them. Like if they do it through algorithms that we more or less know how they work - i.e. the algorithm is using advanced control flow logic to copy and paste from it's training data set and copyrighted material is in that data set
Point is that you can ask 100 programmers to write an average function and probably most of them will come up with this answer verbatim. How can copyright law handle this? There is also the opposite problem, I can copy a complicated snippet and change the variable names. Am I absolved from liabilities now?
If they come up with it on their own, it shouldnt be an issue. Likewise, swapping the variable names does not absolve you from liability.
Copyright really is not only concerned with what exactly is on the page, but also how you got there, and where the knowledge came from to get you there.
What if I read your codebase, and then years later while programming for myself I inadvertently use solutions you came up with while thinking I came up with it myself?
There really are no hard set rules, and this is something that is handled on a case-by-case basis based on whether or not a convincing argument can be made that you copied a novel idea from someone else and claimed it as your own.
We can argue the semantics of it all we want, but the subject area is an active battleground. Typically it only matters when money starts to get involved, since no one usually presses the issue or gets involved with random personal projects. So when an enterprise level company leverages that lack of caring into a proprietary pay-to-use project that operates by copying and pasting code from copyrighted material, then it seems like a case might be able to be made for it.