I think there is a good, fundamental legal/societal question of how copyright should apply to AI output. I just don't think our existing copyright structures handle this question well.
Note there is currently a very important case before the SCOTUS that is related to this issue, [1] where the original photographer of a Prince photo is suing Andy Warhol's estate for copyright infringement. The fundamental question is whether the Warhol series of painting are "transformative" enough of the original photo. While there are always gray lines on what "transformative" means, if there is any chance that Warhol's painting are legal and not infringing, I don't see how Copilot could be in the wrong. Copilot's output, even if it contains a substantial amount of the original source, appears to me much more "transformative" than the Warhol paintings are compared to the original photo.
1. https://www.npr.org/2022/10/12/1127508725/prince-andy-warhol...
Is it really better to only draft laws that are clear without courts?
Is that provable?
Badly written law and poor legislators are a problem in any system.
Copilot is a set of trained weight values in a matrix. There is no source code stored in that matrix. The fact that someone can prompt Copilot with specifically chosen text to generate a short sequence of code that matches a corresponding segment of code used to train the model does not mean that it is somehow "just retrieving" that snippet. It is _generating_ that code, guided by the weight matrix, via pattern-matching based on the chosen textual prompt and surrounding context.
That distinction is significant because one of the primary defenses against copyright infringement in US law is if the derived work is transformative. Copilot is a work derived in part from Github code, but it has unique capabilities far beyond returning short snippets of input code, and the work itself is clearly an extensive transformation of the input data.
This is without even considering whether concrete _outputs_ of the model that happen to match code in a repository used to train it are themselves protected via copyright or not, which is another issue entirely (and not as cut and dried as many folks on here seem to think).
Any higher court ruling might well draw some lines between different domains, but be clear that a ruling against GitHub would almost certainly be a ruling for copyright maximization and against fair use in other respects. So be careful what you wish for.