views:

314

answers:

3

Is copying open source code considered legal in terms of license, forget about plagiarism? I have seen some codes is exactly the same as open source code, the only thing changed is the package name and the class name.

Thank you

+3  A: 

as long as the license allows it, you can do anything.

AFAIK, Open Source licenses are all about allowing you to copy code, with different restrictions. GPL allows it if the result is GPL too. MIT and MIT-like licenses usually only require attribution. some BSD licenses don't even require that.

in any case, not attributing to the original authors is considered rude at the least.

Javier
Unless the license expressly permits it, it's covered by copyright law. There are also aspects of the copyright law that give you rights (fair use doctrine, for one). And, in law, there is no rude, just legal and illegal.
paxdiablo
+13  A: 

It depends entirely on what license the original source code was released under.

The only case that I know of where this is fine, is if the code was explicitly released into the Public Domain.

The above scenario described violates GPL, BSD, MIT, Apache and Creative Commons Licenses!

Most likely this is illegal. (I am not a lawyer, and international application of these licenses is always fun, etc etc).

The reason it is illegal is the above licenses have clauses, where you have to credit the original authors. I assume this is not the case in your scenario.

Scott Markwell
If you've seen "some codes is exactly the same as open source code, the only thing changed is the package name and the class name" you should alert the author that they're in violation of the license.
S.Lott
In addition to public domain code, the WTFPL (http://sam.zoy.org/wtfpl/) allows unrestricted and uncredited copying.
Michael Burr
I thought the BSD license removed the attribution clause some time ago.
paxdiablo
Not sure why -only- changing the class and package name would be a problem? Presumably the attribution would technically be intact in that case.
Tchalvak
+1  A: 

It depends on the exact open-source license.

Most licenses require you to include sufficient traceability information in your code (e.g., if you copied entire files or even sections), and in some cases restrict your ability to sell that code as your own.

Complete plagiarism is in violating of these licenses, though I am not sure if any entity is actually capable of enforcing these.

Uri
Sure there is, the license grants you rights if you follow certain rules. If you don't follow those rules, you're subject to normal copyright law and the copyright holder can sue you.
paxdiablo
True, but under what jurisdiction? If I write code that is mixed with the code of 30 other people on a virtual server that may be hosted in several countries, and is plagiarized by another distributed project, where and whom would you sue?
Uri
You'd have to sue in the jurisdiction where the offense took place. In the internet world, it turns out that can be anywhere if they're shipping the code over the wire. And you'll want to make sure it's coming from a country that's signatory to the Berne convention otherwise don't waste your time.
paxdiablo
And, finally, someone that understands where to use who and whom :-)
paxdiablo