I sometimes read people's open source code on github and use the ideas from that to develop my own ideas. In fact sometimes I copy and paste short passages and then rework them. I also employ a team of people who may do the same. Is that fair use, yes of course it is. Is co-pilot automating that fair use, I would say so.
Many people would claim what you're doing is a derivative work. I'm not sure the "of course it is" is very clear-cut (at least in the US). I've worked at big companies that have lawyers that care very much about this topic and what you're describing is prohibited. But, maybe it's different if you're not distributing your source.
> I've worked at big companies that have lawyers that care very much about this topic and what you're describing is prohibited.
They are doing this to make sure that any lawsuit can be easily dismissed. It has nothing to do with the legality of the action (which sounds like fair use as the parent described it), and everything to do with the expense of a potential lawsuit compared to the cost effectiveness of simply telling developers “don’t do that”.
Most people think that the law has two shades: lawful vs unlawful. But the more practical distinction is expensive lawsuit vs dismissed lawsuit. This is the lens through which corporate lawyers see copyright and it might explain why so many programmers think that copilot is “obviously” breaking the law and “stealing” their code.
If the usage was very clearly fair use, there'd be no need to be defensive about it; the case could be dismissed trivially. In reality, the question would need to be sorted out in court.
Questions of derivative works and fair use come up fairly frequently even in the open source world. This isn't solely a question of corporate lawyer posturing. I don't know any copyleft authors that would be okay with someone copying & pasting their code, making trivial changes, and saying it isn't a derivative work. Of course, their understanding of the law may be flawed. You'll get to find out in court.
You're right. A lot of this boils down to how much you want to spend in court proving your usage is just under fair use. We've moved beyond the question of ethics if you're intentionally violating a project's source license and relying on fair use to do whatever you want with the code. If you want to poke someone with a stick, you can't be surprised when they hit back. I contend what the OP described isn't clearly fair use (note I'm not saying that it clearly isn't fair use either). It ultimately doesn't impact me because I'm just not going to copy & paste code from projects without attribution and following the license, but I'd be worried about anyone reading that comment as objectively true.
Or alternately, "I sometimes listen to other people's songs and use those ideas to develop my own. In fact sometimes I copy and paste short melodies and then rework them."
Courts have held that it doesn't apply to music, why do you think different rules apply to code?
Courts are definitely aware of the need to protect the creative process and that no song is truly “original” in all aspects. e.g. the Katy Perry case[0]
Songs are different from code, in that the “hook” that makes the money may be only a few seconds long. There are many creative choices that a songwriter/producer can fit into just a few seconds: the harmony, melody, rhythm, lyrics, timbre, effects, ...
Whereas for code, the space of creativity is limited by functional considerations. A creative choice is protected by copyright but not all choices that programmers make are creative. Often the choices are limited by the API/interface or by efficiency considerations and it turns out that there’s only one good way to do something.
A function may be very intricate, yes, while still containing almost no creative value (e.g. a Vulkan setup function). Music doesn’t have an equivalent to this - the placement of every note is a creative act.
It reminds me of the Google vs Oracle case. Apparently a court found that copying even a small amount of code in breach of its licence is not permitted. [0]