News for hackers. Stuff that matters.
Re:GitHub Copilot is generally available by zelphirkalt on Tuesday June 21, 2022 @12:45PM (#31826077)
Does Copilot already display the licenses of the code it might insert/suggest, or assure the developer, that the inserted/suggested code is not a verbatim copy of existing code? How can developers be sure, that they are not violating licenses by using Copilot?
Re:GitHub Copilot is generally available by lelandfe on Tuesday June 21, 2022 @12:53PM (#31826207)
Previously discussed at length here: https://news.ycombinator.com/item?id=27773157

> or assure the developer, that the inserted/suggested code is not a verbatim copy of existing code

No, it does not do that.

> How can developers be sure, that they are not violating licenses by using Copilot

There are no clear answers.

Re:GitHub Copilot is generally available by nimbius on Tuesday June 21, 2022 @01:06PM (#31826398)
from Microsofts standpoint the shot across the bow for open source licenses is clear: do you have enough lawyers and experts to convince a gerontocracy of the legislative branch of the US government that its not "okay because its AI" because if you dont, then thanks for the code nerd.
Re:GitHub Copilot is generally available by tannhaeuser on Tuesday June 21, 2022 @01:29PM (#31826691)
Idk if MS is on the safe here. There's a straightforward legal theory for suing, and also parties such as EFF and others with a war chest and the determination to clarify this. Does MS provide indemnification to Copilot customers/users if those are sued by others? My advice would be to stay clear of Copilot.
Re:GitHub Copilot is generally available by Spivak on Tuesday June 21, 2022 @05:02PM (#31829072)
If you think the US doesn't have enough existing legal theory on copyright to litigate this then you're crazy. It will be on MS to show that it isn't infringement.
Re:GitHub Copilot is generally available by verve_rat on Wednesday June 22, 2022 @02:59AM (#31832836)
Now add in 100 other legal jurisdictions. I haven't looked, but I assume Copilot is available outside the US?
Re:GitHub Copilot is generally available by marcosdumay on Wednesday June 22, 2022 @11:15AM (#31837139)
I really want MS to try that theory in a court and win.

That will destroy the propaganda that the Law is there to protect content creators better than anything the people against copyrights can come-up with.

Re:GitHub Copilot is generally available by LegitShady on Tuesday June 21, 2022 @01:44PM (#31826887)
it sounds like a good basis for a class action lawsuit, where the class are the people who own the licensed code whose license microsoft is ignoring.
Re:GitHub Copilot is generally available by anonymoushn on Wednesday June 22, 2022 @10:24AM (#31836377)
Seems like I'll get paid for this a while after I get paid for TurnItIn selling a product based on stealing my work
Re:GitHub Copilot is generally available by account42 on Wednesday June 22, 2022 @05:00AM (#31833545)
Can't wait to get my three fiddy for my open source repos.
Re:GitHub Copilot is generally available by injidup on Tuesday June 21, 2022 @01:05PM (#31826392)
From the FAQ

""" We built a filter to help detect and suppress the rare instances where a GitHub Copilot suggestion contains code that matches public code on GitHub. You have the choice to turn that filter on or off during setup. With the filter on, GitHub Copilot checks code suggestions with its surrounding code for matches or near matches (ignoring whitespace) against public code on GitHub of about 150 characters. If there is a match, the suggestion will not be shown to you. We plan on continuing to evolve this approach and welcome feedback and comment. """

Re:GitHub Copilot is generally available by lucideer on Tuesday June 21, 2022 @01:10PM (#31826455)
> the rare instances

That's a bold statement considering how easy it was for testers to quickly find examples of this in initial testing.

> against public code on GitHub

... and how some of those examples found were from code not hosted on Github.

Ultimately though, what matters here is not whether this is true but whether it's plausible enough for legal departments in companies buy it.

Re:GitHub Copilot is generally available by lelandfe on Tuesday June 21, 2022 @01:37PM (#31826813)
https://github.blog/2021-06-30-github-copilot-research-recit...

> That corresponds to one recitation event every 10 user weeks

> This investigation demonstrates that GitHub Copilot can quote a body of code verbatim, yet it rarely does so, and when it does, it mostly quotes code that everybody quotes, typically at the beginning of a file, as if to break the ice

A year old post now, YMMV.

Re:GitHub Copilot is generally available by treesprite82 on Tuesday June 21, 2022 @01:27PM (#31826661)
Do you recall/have a link to such examples? Would be interesting to try them again with the filter.

The example I can remember was Carmack's* quick square root - but I'd probably call that "folk code" given it was passed down/altered before being misattributed to the Quake dev, and appears in hundreds of Github repos (many with permissive licenses like WTFPL, so a well-intentioned human may do the same).

Re:GitHub Copilot is generally available by pydry on Tuesday June 21, 2022 @01:07PM (#31826421)
I remember reading something like this just before somebody proved that it would recite Carmack's square root algorithm word for word.
Re:GitHub Copilot is generally available by anon2020dot00 on Tuesday June 21, 2022 @12:48PM (#31826116)
My sincere question is what if a developer looks at some GPL code, and then that developer encounters a situation in a corporate project where-in he uses the GPL code from memory, is that already a violation?

So to avoid a violation a developer needs to perform a mind-wipe?

Re:GitHub Copilot is generally available by kweingar on Tuesday June 21, 2022 @01:03PM (#31826351)
If the code is nontrivial, then yes, it is a violation. To be in compliance, you need to write your own code.

If I am writing a novel and I copy a section verbatim from another novel, I am infringing on the other novelist's copyright, regardless of whether I wrote it from memory or not.

And this makes sense. For a trivial operation, there might be only one way to write the code. That's not copyright infringement, just like you're not infringing on an author's copyright by occasionally writing a sentence that was similar to theirs. For a nontrivial operation, you can easily write your own code without copying someone else's work.

Remember also that you can use others' ideas. Copyright only cares about the code itself. If there's a clever trick that you've seen someone use, you're free to use the same clever trick as long as 1) they didn't patent it and 2) you're not actually copying their code

Re:GitHub Copilot is generally available by danuker on Tuesday June 21, 2022 @04:27PM (#31828738)
fair use != trivial
Re:GitHub Copilot is generally available by marcosdumay on Wednesday June 22, 2022 @11:18AM (#31837170)
It's not about fair use. If you have a problem that can only be solved by one specific implementation, that implementation is not copyrightable because it has no creativity behind it.
Re:GitHub Copilot is generally available by sp332 on Tuesday June 21, 2022 @12:57PM (#31826267)
It's arguable. Copyright cares a lot about provenance, transformation, and commercial consequences. It all comes down to what you can afford to litigate. Some projects go to extreme lengths, like Wine not accepting code from anyone who has seen leaked Windows sources.
Re:GitHub Copilot is generally available by bladegash on Tuesday June 21, 2022 @12:56PM (#31826249)
I’d be even more curious (more philosophically than anything) as to who is liable for the mishap if Copilot suggests something that ends up violating a license. Is it the developer? The developer’s company? GitHub? Maybe the “AI” is the ultimate scapegoat (“we can’t be liable for what our helpful robot decides to do”)!
Re:GitHub Copilot is generally available by carschno on Tuesday June 21, 2022 @01:00PM (#31826308)
The details might differ per country, but my non-lawyer intuition clearly says that you are responsible for the code you publish, no matter what tool has suggested it.
Re:GitHub Copilot is generally available by bladegash on Tuesday June 21, 2022 @01:10PM (#31826454)
I’m sure at the end of the day that would be the case in most sane legal systems. However, it does seem almost impractical in reality for anyone to do anything about it (kind of like Uber/Lyft/Airbnb making something so commonplace so quickly that the regulations they broke became meaningless).
Re:GitHub Copilot is generally available by theplumber on Tuesday June 21, 2022 @01:29PM (#31826690)
It's the developer. Just because you copy/paste something you find on SO or Google or Githib doesn't absolve you of copyright infridgements
Re:GitHub Copilot is generally available by ska on Tuesday June 21, 2022 @01:57PM (#31827025)
In most jurisdictions, if the developer is an employee the legal liability is with the company.
Re:GitHub Copilot is generally available by eat_lemons on Wednesday June 22, 2022 @01:06PM (#31838733)
There are many instances of people not even being able to see the code in question, see clean room engineering

An example for wine/proton/reactos developers from a moderator on the forum about the leaked windows xp code:

"You look at the code? You worked for MS? No dev for us! It's that easy."

https://reactos.org/forum/viewtopic.php?t=20189

There are many instances of large lawsuits where just seeing the old code made you in eligible to even touch the new code

Re:GitHub Copilot is generally available by hourago on Tuesday June 21, 2022 @01:31PM (#31826722)
> that developer encounters a situation in a corporate project where-in he uses the GPL code from memory

If you draw Micky Mouse from memory, Disney still owns the copyright.

Re:GitHub Copilot is generally available by duxup on Tuesday June 21, 2022 @12:49PM (#31826124)
From my experience with it the suggestions are so generic it's hard to imagine anyone has a legit license to "formatDateISO....() {code here}".

Maybe I'm using it wrong but I've hardly seen it pump out a mass volume of code.

Re:GitHub Copilot is generally available by lelandfe on Tuesday June 21, 2022 @12:58PM (#31826275)
You really only need one example to offset this anecdote, so here you are: https://mobile.twitter.com/mitsuhiko/status/1410886329924194...

Copyright violations are a genuine concern from the outputted code, GitHub themselves have admitted it may emit raw training data rarely.

Re:GitHub Copilot is generally available by natefinch on Tuesday June 21, 2022 @01:18PM (#31826561)
There is logic to ensure that copilot does not emit exact duplicates of code in the training set... but that logic is significantly newer than that tweet.
Re:GitHub Copilot is generally available by lelandfe on Tuesday June 21, 2022 @01:31PM (#31826719)
Link? I couldn't find anything "significantly newer" than 7/2/21 (though I'm sure GitHub is doing a lot here). They had this blog post 6/30/21 regarding efforts on avoiding raw code: https://github.blog/2021-06-30-github-copilot-research-recit.... They concluded:

> We will both continue to work on decreasing rates of recitation, as well as making its detection more precise.

Re:GitHub Copilot is generally available by natefinch on Tuesday June 21, 2022 @01:40PM (#31826849)
Source: I work on the copilot team.
Re:GitHub Copilot is generally available by hnbad on Tuesday June 21, 2022 @02:22PM (#31827274)
Was that decision informed by legal or product? Because derivative works are still derivitative works even if you don't replicate the original verbatim.
Re:GitHub Copilot is generally available by natefinch on Tuesday June 21, 2022 @02:30PM (#31827354)
I mean, it was informed by both, but basically everyone thinks it's a good idea.
Re:GitHub Copilot is generally available by bladegash on Tuesday June 21, 2022 @12:52PM (#31826184)
Nope, have had the same experience as you and am of a similar opinion!
Re:GitHub Copilot is generally available by bladegash on Tuesday June 21, 2022 @12:50PM (#31826153)
Others may have a different experience, but I have never seen Copilot offer suggestions anywhere near complicated/unique enough for it to matter.

That’s not a knock on Copilot, I think it’s a great product and I happily subscribed today after using it the last few months!

Re:GitHub Copilot is generally available by lm28469 on Tuesday June 21, 2022 @01:08PM (#31826425)
It's my experience too. It's a fancy autocomplete that works about 30% of the time for me, I'm not actually sure I'm saving time by using it.
Re:GitHub Copilot is generally available by AdmiralAsshat on Tuesday June 21, 2022 @01:14PM (#31826491)
The fact that GitHub is now charging for this feature smells like a lawsuit waiting to happen. They're now literally profiting from potentially stolen GPL code.