If someone uploads something and says 'hey, this is some code, this is the appropriate licence for it', it is their mistake, it is in violation of Github's terms of service, and may even be fraudulent. [0].
I'm also not sure that Copilot is just reproducing code, but that's a separate discussion.
> If I reproduced part of a book from a source that claimed incorrectly it was released under a permissive license, I would still be liable for that misuse. Especially if I was later made aware of the mistake and didn’t correct it.
I don't believe that's correct in the first instance (at least from a criminal perspective). If someone misrepresents to you that they have the right to authorise you to publish something, and it turns out they don't have that right, you did not willingly infringe and are not liable for the infringement from a criminal perspective[1]. From a civil perspective, likely the copyright owner could still claim damages from you if you were unable to reach a settlement. A court would probably determine the damages to award based on real damages (including loss of earnings for the content creator), rather than anything punitive if it's found that
Further, most jurisdictions have exceptions for short extracts of a larger copyrighted work (e.g. quotes from a book), which may apply to Copilot.
This is my own code, I wrote it myself just now. Can I copyright it?
```
function isOdd (num) {
if (num % 2 === 0) {
return true;
} else {
return false;
}
}
```
What about the following:
```
function isOddAndNotSunday (num) {
const date = new Date();
if (num % 2 === 0 && date.getDay() > 0) {
return true;
} else {
return false;
}
}
```
Where do we draw the line?
[0]: https://docs.github.com/en/site-policy/github-terms/github-t...
[1]: https://www.law.cornell.edu/uscode/text/17/506