I have re-written an open source project from java to haxe, then from haxe compiled to javascript, with totally different UI

So, the question is, is the code considered to be mine after rewriting it to another language in a closed source project? can I use it freely with no worries about original copyrights?

  • 2
    In case somebody is interested, there is a proposal for a Q&A site regarding open- source licensing at area51: area51.stackexchange.com/proposals/58715/… Commented Aug 21, 2013 at 18:55
  • An anecdote. In my previous organization, we implemented an algorithm in parallel with Google. Both our and their team followed the same paper, and looked at each other's code. From the communication, it become clear that they won't be offended only provided taht we took a completely different approach - different class structure, different interpolation algorithm, etc. In the end, ours worked better ;P
    – Vorac
    Commented Aug 22, 2013 at 8:41

5 Answers 5


No. It is derived from the original open-source project, thus a so-called derivative work, still protected by the original copyright.

In copyright law, a derivative work is an expressive creation that includes major, copyright-protected elements of an original, previously created first work (the underlying work)...

For copyright protection to attach to a later, allegedly derivative work, it must display some originality of its own. It cannot be a rote, uncreative variation on the earlier, underlying work. The latter work must contain sufficient new expression, over and above that embodied in the earlier work for the latter work to satisfy copyright law’s requirement of originality...

  • 1
    If you do a rewite in another language, what are the copyright-protected elements that get included in the derivative?
    – Pieter B
    Commented Sep 18, 2013 at 7:02
  • How does this stand with white-box (I think that's the term) program development? Say I develop a piece of software by looking at other, precomiled, software (without reverse engineering back to the source code). My new software is based on how I believe other solutions handle the problem, but it isn't derived from the original source code. Is it still a derivative work? Commented Sep 18, 2013 at 10:32
  • 2
    @JamieTaylor Open source work alikes have a long history of not being considered derivative works. As long as you follow a clean room technique you should be OK.
    – stonemetal
    Commented Sep 18, 2013 at 16:21
  • @stonemetal thanks for the pointer. I'll make a point of sticking to clean room techniques where I can. Commented Sep 19, 2013 at 10:14

IANAL either. I think that it all depends on how you do the "rewrite."

If you just look at the original source code and rewrite that into a different language, then I would say it is a derivative work covered by the existing copyright.

However, if you do not look at any of the source and you only look at the applications output and screens and behaviours, then I believe your work will not be derivative work.

That said, this is really a question for a lawyer.

  • Yes, I rewrote the code to a different language, I think its a derivative work .. thanks Commented Aug 19, 2013 at 10:20
  • 11
    +1 for describing the difference between a clean-room-reimplementation and a derived-implementation. This happens all the time in commercial hardware and software. Commented Aug 19, 2013 at 11:06
  • Wikipedia entry on Clean Room design shows the approach needed for this.
    – Alok
    Commented Aug 19, 2013 at 22:33

Despite the other answers, its not as clear cut as they make out. It comes down to what you actually did when you 're-wrote' the application.

Consider these scenarios:

  1. If you sat down with the original source code and applied an automatic translator to the original source code and produced new code in the new language, then you have added no new originality to the work, and probably do not even own copyright on the new source code.
  2. If you sat down with the original source code, and thought about how you could solve the same problem, but in the new language, largely copying the same approaches, but varying them where the new language behaved differently, then you will have added some (small) originality to the work. it will be a derived work, and you will still be bound by the terms of the original programs license agreement.
  3. The only way to be certain that you have created original software is to sit down, and think about the problem afresh. Think about how you would solve it today, in this language. You must avoid the temptation of looking at the original code to see how they solved problems. In this scenario, you will own the copyright to your project, and it will not be a derived work, leaving you free to license it under any terms of your own choosing.

If you just port the same code it will be considered a derivative thus the same license must be used (at least for GPL). If you want to use a different license you must reimplement the whole product without reusing any source code (even a coincidence might be a problem if the case goes in court so be careful).

  • We've already seen where this can lead (remember Google x Oracle). Commented Apr 5, 2014 at 19:24

I am not a lawyer, and cannot give legal advice, which is what you are asking for. I do, however completely agree with @chirlu: it is a derivative work.

The completely proper thing to do is ask the original owner(s). If you think that they will assert their copyright then you have answered you own question.

In such situations it is better by far to be cautious.

  • actually, "what does the law say" is rather explicitly not practice of law. "is my exact situation in accordance with the law or not" is what you want to avoid. If the op had shown an exact code base or described the particulars of his work, then you might have something to worry about
    – DougM
    Commented Sep 18, 2013 at 15:14

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