5

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?

2
  • 2
    How are you porting a library to Java, if the original lib contained JavaDoc comments? Ultimately, though, what you must leave in is determined by the license, which you have not mentioned. Commented Jan 14, 2012 at 2:45
  • Other languages use JavaDocs too btw. ActionScript for example. I think you can assume I have checked that I have permission to port the library. I am really looking for best-practice.
    – Adam Harte
    Commented Jan 14, 2012 at 3:54

3 Answers 3

1

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:

@author Java port by Adam Harte, based on ActionScript original by Bill Gates

(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.)

0

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.

-2

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.

Edit:

It seems like most people disagree with me, and consider re-writes in a different language to be derived work: https://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: https://stackoverflow.com/questions/77044/licensing-a-rewrite-from-gpl-to-mit

15
  • 2
    Boo! This kind of playing fast and loose attitude with IP that gives software coders a bad name. It is definitely not "just your inspiration" if you look at the code and reproduce the same interface and functionality in a different language. Commented Jan 14, 2012 at 6:58
  • I would be very interested in hearing your answer on this topic @ThePopMachine
    – Adam Harte
    Commented Jan 14, 2012 at 7:01
  • @ThePopMachine, if you believe this isn't the legally correct answer, please vote me down. I'll try to find a credible source for my view. Basically this is what I believe to be true. Take the various XUnit frameworks for examples. Who are the authors? They are basically just ports of eachother..
    – Torbjørn
    Commented Jan 14, 2012 at 7:16
  • @Torbjørn Without this being a comment in your answer (I don't have an opinion on the matter), please refrain from answering questions if you have to try to find a credible source for my view. This is not the best place to share your opinions, unless of course you can back them up by facts & references.
    – yannis
    Commented Jan 14, 2012 at 16:42
  • 1
    @Torbjørn: I only stumbled back on this because for some reason I was looking at previous comments of mine. How can an attitude be wrong? Because we're talking about legal matters, not opinions. If you do the wrong thing legally, you are asking for jailtime, $1k-1Ms of fines for your employer or yourself, and not only unemployment but the end of your career. The only reason I found myself drawn to comment again after three years is because it is honestly a very serious matter which you need to wrap your head around. Or get used to the idea of working at SBUX. Consider yourself warned! Commented Jun 29, 2015 at 22:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.