10

Is porting code from one programming language to another considered as plagiarism?

2
  • In an academic setting, if you clearly state the original source and give due credit, it's not plagiarism. In the real world, assuming the original is publicly available, with a license that allows it, this kind of thing is normal and is done all the time - just link back to the original author's code ("This is a port of [link]"). Apr 4, 2020 at 5:42
  • Just to be clear, I assume someone else wrote the original code? Because your question omits that detail, and I don't quite see how you'd expect porting your own code to be illegal - but I prefer to make sure.
    – Flater
    Apr 5, 2020 at 11:14

3 Answers 3

13

Plagiarism is mostly something in the academic world and is the case if you don't give the proper credits to the people you have based your work on.

In the non-academic world, people care less about giving credits in the academic sense, but they do care about potential legal issues like copyright violations.

Every written work is in principle protected by copyrights (with a few exceptions that are not relevant here). To make a translation of a copyrighted work, even a translation into a different programming language, you need to have a copyright license that allows you to make modifications to the work (as translating is seen as modifying). This license will also indicate under what conditions modification is allowed.

It is a matter of courtesy to acknowledge the original project even if the license does not require it.

4
  • 6
    "It is a matter of courtesy to acknowledge the original project.". Depending on the license of the original project, it might even be required.
    – Polygnome
    Apr 4, 2020 at 8:34
  • 1
    You surely meant "it is a matter of courtesy" even if the license does not literally require it (otherwise, it is a license breach).
    – Doc Brown
    Apr 4, 2020 at 10:31
  • 3
    It's also important to distinguish between the protection afforded to an actual written work, and protection for the mere concepts or ideas it employs in general. Generally speaking in software, the concepts themselves are not subject to protection, so there may be a distinction between a slavish translation and a true reimplementation.
    – Steve
    Apr 4, 2020 at 11:43
  • 1
    @Steve You are completely right. Nevertheless rewriting something on the same ideas, the same overall structures, arranged in a similar manner could be considered as a non literal copy - So could still be relevant for copyright.
    – Christophe
    Apr 4, 2020 at 21:51
1

It doesn't really make sense to talk about plagiarism without context. Plagiarism is an ethical / moral construct, and ethics and morals are dependent on country, culture, community, and a million other things.

[This is very different from copyright violation, which is a legal construct. While copyright law is different from jurisdiction to jurisdiction as well, at least it is written down. Plus, there are international treaties which many countries have signed, that specify some minimal protection that all signatories must provide.]

For example, in most countries, plagiarism is not illegal. But in a few countries, it is. On the other end of the scale, in some countries, plagiarism is considered a form of flattery.

As an example, foreign exchange students coming from cultures where plagiarism is considered a form of flattery sometimes have trouble adapting to, say, a university in the US, where plagiarism is considered to be academic dishonesty, and thus violating the honor code every student has to agree to as part of their contract, which means that plagiarism can lead to termination of the contract, i.e. expulsion!

So, the answer to your question is that whether porting code from one programming language to another is considered plagiarism depends on the country, the culture, the community, and probably some other factors.

2
  • As an example, in Germany the author of some work has the exclusive and non-transferable right to claim that they are the author of a work. Even if someone else has the copyright.
    – gnasher729
    Apr 5, 2020 at 9:29
  • That's one of the differences between how the French-inspired systems work and the English-inspired systems, and it is not coïncidence that e.g. the French and German systems are called "droit d'auteurs" (Author's Rights) and "Urheberrecht" (Creator's Rights), whereas the name of the English system "copyright" puts the focus on the commercial applications. The French systems have a heavy focus on the work as almost like an inseparable extension of the personality of the creator, whereas copyright focuses on, well, copying, i.e. the material exploitation. Apr 5, 2020 at 9:33
1

Plagiarism is taking a work that someone else has created, and claiming that you created it. If you port code from another programming language, and then don't make clear that this is not code that you wrote originally yourself, that is plagiarism. If you make clear that your code is a translation of someone else's code, then it is not plagiarism.

Plagiarism is solely about the question "who wrote this?". Plagiarism isn't a crime or offense per se, but can be depending on context. In an academic setting plagiarism may get you removed from your job, because academic honesty is taken very seriously. Outside academia, if you get a promotion because you wrote this great software, and it turns out it was really written by your colleague who was in hospital for three months, that could be fraud and could get you fired. In other situations, nobody cares much.

Copyright is about the question "who has the right to use, modify, or distribute this work and make money from it". Copyright law says you don't have the right to make that translation without permission by the copyright holder. Copyright law says that both you and the copyright holder of the original have copyright in the translated code.

At work, copyright infringement could be taken very serious. Because if your company uses or sells software that is based on copyright infringement they could be in major legal trouble.

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