I ported a library to Java, but am wondering what to do with the JavaDoc comments. The original library used javadoc comments too, so do I leave the @author tags from the original code? And how do I give myself credit as the person who ported it over?
- Anybody can ask a question
- Anybody can answer
- The best answers are voted up and rise to the top
The license that governs the original code will likely define what is required - many licenses require you to explicitly give credit if you create a derived work.
In terms of what is appropriate, I'd suggest that it's always appropriate to give credit to your sources, for example:
(And yes, I know this isn't accurate, as the OP didn't tell us the original language or author, it's just an example.)
Legally, in most places where software is written (including NZ), your port is a copyrightable derivative work (through either translation or adaptation, it's not obvious which) based on another copyrighted work. Assuming the license on the original work allows you to do the port at all, you must respect the rights of the original authors, including attributing their work to them.
Ethically, unless your port involves significant creative effort, it isn't even clear that you deserve any credit at all. Many is the time I have "transliterated" an algorithm from one programming language to another, where my effort consisted merely of mapping one set of keywords and special symbols to another. Java and C#, for example, are so closely related that I'd have a hard time claiming a copyright in any code I moved from one to the other.
I'm no expert, but basically I believe you are the author of the code you have written, as long as it's not a copy, and you were allowed to look at the code in the first place. The original code is just your inspiration. Best practice is to clearly mention who wrote the original code though.
To elaborate I believe copyright does not protect code if it is re-written in a different language, even if it is pretty close to the original. If the solution represented by the software is patented however you can't reproduce it in any language.
The only question as far as I can see is if a port is to be considered derived work, and if the particular licence protects this.
It seems like most people disagree with me, and consider re-writes in a different language to be derived work: http://stackoverflow.com/questions/1919010/does-porting-count-as-derivative-work
The accepted answer here however says otherwise - that only the actual lines of code in the original software are protected: http://stackoverflow.com/questions/77044/licensing-a-rewrite-from-gpl-to-mit