This is a hypothetical question, but I am curious. Feel free to ignore it, when it seems too theoretical for you.

Some people may know the situation that you implement a feature and in the end you have added like 10 lines and removed 100 and from the 10 there are possibly 5 that just were moved around and not really added.

Now suppose person A writes code and releases it with a strong copyleft, e.g., using the GPL. Person B contributes by this code and improves its efficiency by removing redundant (but not dead) code and in the end person B contributed a lot of deletions.

Afterward, person A wants to re-license the code with a weak copyleft, e.g., using the BSD license. To do so, he or she asks every contributor to relicense his/her code and removes any code from persons that cannot be reached or not willing to re-license.

Let's say person C is rewriting the missing pieces and licensing them under the BSD license, so there is no conflict with person A already knowing the removed code.

Now there is a problem: person B contributed a lot of deletions, but the deletions made a significant difference, so you would think that copyright should apply. At least for the diff (containing the content to be removed) it certainly does.

How does copyright apply to this case to the resulting code (without its commit history) and what can person A do with the GPLed deletions? You could say he cannot keep them, as then the project stays the same as after the work of person B. But should he re-add the deleted code?

Even when he does and person C removes it again, the result is the same and looks just like the code with the GPLed deletions, so it cannot be free of GPL work (i.e. the negative code).

  • You need to focus on the test for copyright infringement (for the country in which the law of copyright is to be applied). If there "isn't" code in the allegedly infringing copy, then it's not relevant in UK copyright law. – lellis Jul 20 '20 at 23:08
  • 3
    To make the scenario even more twisted: What about code that is removed to be able to facilitate a relicensing? – Wrzlprmft Jul 21 '20 at 8:26
  • 1
    There is quite a lot of copyrightable content that you could generate by having a monkey type on a typewriter for sufficiently long and then removing suitable characters from the output. – Federico Poloni Jul 21 '20 at 8:43
  • The answers to such questions surely depend on the country because the copyright laws differ from country to country: One (completely different) example are API interfaces: In the USA they seem to be protected (trial Google vs Oracle), while the German law explicitly says that they are not protected. As far as I know the situation in Germany, code changes that are only "straight forward monkey work" do not grant Person B any copyright. However, any "non-obvious" code changes do. – Martin Rosenau Jul 21 '20 at 13:00
  • 1
    By the way: Here in Germany there was some Fax program whose screen shots were already drawn (by pencil) by another person before the program was written. Later, a court decided that this program is not copyright protected because the software developer could not explain why implementing a program whose screen shots already exist is not "straight forward monkey work". – Martin Rosenau Jul 21 '20 at 13:06

For me, this exposes a weakness in the mental model many coders seem to have about the operation of copyright.

Consider a pile of bricks, representing code contributions to a work. In one (surprisingly common) model, each brick is painted in a colour representing its licence status; red for BSD, blue for GPL, green for Apache, and so on. Whoever made and placed any given brick can consent to its repainting, but nobody else can, though anyone can remove a brick from the pile. In this model, a pile of A's bricks, painted blue, is added to with blue bricks from B. A now wishes to paint the pile red, but cannot because of B's bricks, so sie asks C to make some red bricks with which to replace them. Once the pile is entirely composed of A's blue bricks and C's red bricks, A repaints hir bricks red. How can the sometime presence of B's blue bricks be a problem?

According to a practising barrister and sometime lecturer in copyright law with whom I have discussed this1 a better mental model is a pile of bricks under one or more comparably-coloured tarpaulins (waterproof covering sheets, aka tarps), with names written on them. Here, anyone can add or remove bricks, but any time you touch a pile under one or more tarps, you add your name to the list(s) written on the tarp(s). The colour of a tarp specifies certain rules: for example, bricks removed from under a blue tarp can't be used in any other pile which is not also under a blue tarp. You can in some cases combine piles under various tarps, and throw a new tarp over the whole lot, without necessarily removing the under-tarps. Certain operations on certain coloured tarps (eg, replacement of a blue tarp with a red tarp) requires the consent of everyone whose name is written on the tarp.

I do not mean to suggest everyone should adopt this mental model, and certainly not all the time, because like any abstraction it too has problems. But thinking about it may reveal to you when you're (quite possibly unintentionally) using the coloured-bricks model, because that is not a good model for copyright. For a start, coloured-bricks falls foul of the Ship of Theseus problem, as we have well-documented here. The tarp model has no issues with the Ship of Theseus, and that alone, to my mind, makes it useful.

The tarp model makes understanding this question less-problematic. Firstly, A piles up bricks under a blue tarp with A's name on it. B comes along, removes several, and writes hir name on the tarp. A replaces them. C then slides a small pile of bricks, under their own tiny red tarp, underneath the big blue tarp, removes some of the bricks replaced earlier by A, and adds hir name to the blue tarp. You now have a blue-tarp-covered pile with three names on the tarp: A, B, and C. The consent of all three will be required to replace the blue tarp with a red tarp (again, with all three names on it).

In short: A, B, and C are all rightsholders in the current work, because all have made contributions to it. The consent of all will be required to relicense it away from GPL.

If A can apply C's changes to the last version before B did any work on it, and if C's changes were made without knowledge of anything B had done, then you will have forked the project to a point where A and C are the only rightsholders, and relicensing will be possible without B's consent.

1Nevertheless, I am an imperfect conduit, and any mistakes are of course mine.

  • 8
    Since you mention it, I will note that nothing I read in the Berne Convention, or in my local copyright acts, suggests such a fading with time. A copyright interest continues unabated, as I understand it, until it doesn't (see relevant local legislation). – MadHatter Jul 19 '20 at 9:09
  • 3
    @allo I am not thinking of "e.g. the git history". I am thinking of rightsholders in the code in its current expression. – MadHatter Jul 19 '20 at 9:39
  • 9
    This logic makes sense to me, but the implications seem super problematic! If a contributor cannot be contacted, you can rewrite the code they contributed. But if someone who deleted code can't be contacted (or is being a stick-in-the-mud, or what have you), what is one to do? Go all the way back to the beginning of the project? – Wowfunhappy Jul 19 '20 at 18:26
  • 2
    +1 for "any mistakes are of course mine [by copyright]" – ΛRYΛN Jul 20 '20 at 16:30
  • 4
    @Wowfunhappy: Unfortunately, it's generally not that easy. Copyright does not inhere in individual lines of code. It inheres in the entire codebase (or at least the self-contained module-ish unit of reuse). If someone made an original, creative contribution to the codebase, it's very difficult to "unring the bell" regardless of whether that contribution was an addition or a deletion. Their changes may have been refactored, copied, or even imperfectly mimicked in other parts of the codebase, and all of those are potentially derivative. – Kevin Jul 20 '20 at 18:36

Not all changes are of sufficient novelty to constitute something copyrightable, whether they are additions or deletions.

For a simple example, consider any old out of copyright song or hymn of five verses. I could make an 'arrangement' of only the first, second, and fifth verses, but this should not be considered novel enough to be copyrightable.

So in terms of your question about code, I think we would have to see the actual code and what was deleted to make any judgement about it. If what was removed was previously cleaned encapsulated in module-like code (not necessarily using any programming language's module syntax) and the whole module was removed and nothing else, as a non-lawyer I'd guess it probably doesn't reach the level of being copyrightable. But if the deleted code was thoroughly interspersed through the code which was kept and it required a lot of thought to determine what should be kept and what should be deleted, then I'd guess it probably can be copyrighted. But if it matters to you, get a lawyer!

For a non-code example of the later, consider the idea of taking an old out-of-copyright novel, perhaps Little Women, and deleting any sections which don't pass the Bechdel test. I'd think the resulting work is probably novel enough to be copyrightable, especially if they were careful to leave enough connecting sentences that it still makes sense or has a logical plot.

So if B's contributions are thoroughly intertwined with A's original code, probably the best way forward is not to try to cut out only B's code, but all the affected sections or modules even though parts of them were authored by A not B. Then C can replace the whole modules and you don't need to worry about B's contributions any more.

  • 2
    "the best way forward is not to try to cut out only B's code, but all the affected sections or modules" - this is the best and the most practical advice. – meolic Jul 20 '20 at 7:14

While in some sense this is really a question for Law SE, the common-sense version of it is a matter of whether there are original ideas in the deletion and whether the changeset is expressible (not necessarily as a patch, just in some comprehensible form) in a form that's insufficiently original/creative to be subject to copyright. As the extreme cases, consider:

  • Case 1, pretty clearly no copyright: "Remove froblicate function and all calls to it."

  • Case 2, pretty clearly copyright: Imagine a giant useless program consisting of an lexicographic-ordered list of all possible statements of length at most 80 characters in a language, where the "modification" of the "program" is a list of lines to remove to make it into a useful program.

You can imagine an entire spectrum between these. Unless it's incredibly obvious, where a particular case falls is really a matter for a lawyer.

  • Congratulations! You just copyrighted the universe! Seriously though, you'd also have to reorder the remaining lines to make a working program, and there's the possibility of necessary duplicate lines. ++$i; is not copyrightable by itself, only in the context of many other lines. – CJ Dennis Jul 21 '20 at 13:18
  • I did some handwaving there but spaces or other "stuffing" allow you to avoid reordering. – R.. GitHub STOP HELPING ICE Jul 21 '20 at 13:49

I believe the question makes the assumption that there's just a single work and copyright can either apply or not.
However, we have two works which are separately copyrightable: The commit history, and the code at a specific version.

You get copyright in the history if you have a commit there, since you are one of the many authors of that history.
You get copyright in a specific version of the software if you code is in it. If your lines get deleted, you retain the copyright to the versions that have your lines, but not to later version.

  • I am asking about the latest version only, ignoring the commit history, but keeping in mind the history (as concept) of work that is done by different people. So the result is copyrighted by different people and some contributions were actually deletions, so they are not visible (without some kind of commit history) but the result would be another one if this work was not done. – allo Jul 19 '20 at 20:40
  • 1
    "You get copyright in a specific version of the software if you code is in it. " is not true from the legal perspective, copyright applies to entire works, not specific lines, and you can make a derivative work (with appropriate permission of the original author) where you only delete parts; according to copyright law you would hold copyright on the derivative work even though it has no "your lines" in it. Copyright law has no concept of "your lines", the relevant concepts are "derivative work" and whether a work/modification is copyrightable at all. – Peteris Jul 20 '20 at 9:20
  • @Peteris It is part of the problem, that code derived from your changes that does not contain your exact code anymore still may be a derivative work from your code. While you can try to quantify how much / how successful the code was replaced by code that's not copyrighted by you for lines that were added, I think it is a complicated question to quantify this for lines that were removed. – allo Jul 20 '20 at 15:09
  • @allo modified lines can contribute copyright, but deleted lines do not. Yeah I know this can be a fine line, but the question already assumes that this line is clearly defined since it explicitly talks about deleted lines. – toolforger Jul 21 '20 at 9:17
  • @toolforger Where do you draw the line between modified and deleted and added another one? When I remove i++ and insert i+=2, did I modify the line or not? What about i+=1 to i+=2 (less characters difference)? This is not that clear either. But let's stay on-topic with deletions that affect the result of the program. – allo Jul 21 '20 at 10:09

If you modify a work by removing from it or making rearrangements, the modifications you have made are based on your ideas which manipulate someone else's expression. Copyright is concerned with expression, not ideas.

The copyright statutes in the United States do not define what "expression" is. If you wanted to assert copyright over something where your only contribution was chopping, rearranging and deleting existing content, you would have convince a judge that it plausibly constitutes an expression, which would probably be difficult.

For one thing, your expression isn't a piece of content whose existence can be demonstrated on its own. You cannot show the judge:

  • here is the material I expressed, viewed separately from the combined work in question; and
  • here is where that same material appears in the combined work, which should therefore acknowledge me as a copyright holder

The material you expressed, in isolation, is just a blank, a nothing.

The US Copyright Law has a paragraph about derived works, 103.

Fistly, (a) states that if a derived work is unlawful, then it enjoys no copyright protection. This has implications for open source software, because, by default, a work grants no permissions for making derived works. The permitted ways for making derived works are defined by the specific license. If the license happens to say that the author of a derived version who simply deletes or rearranges lines of code is not permitted to add their name to the copyright notice, then that holds. If the license is violated, then it lapses, leaving that person with no permission to redistribute. Most open source licenses neglect to have such wording, however.

Subparagraph (b) is about lawful derivative works; this is more relevant to the present topic, has this sentence: [t]he copyright in a compilation or derivative work extends only to the material contributed by the author of such work, as distinguished from the preexisting material employed in the work, and does not imply any exclusive right in the preexisting material.

A deletion or rearrangement does not look like "material contributed", which is "distinguished from the preexisting material". All portions of the derived work are material which is preexisting. Concretely speaking, no line of code in the material is one which cannot be found in the original version.

Of course, people will try anything in court, and sometimes there are surprises.

  • 6
    Bearing in mind I agree that you need to convince a judge/jury of any legal conclusion, I think I disagree with the (implicit) suggestion that this case would prove particularly difficult. In particular, USC 17 s.101 explicitly lists an "abridgement" and a "condensation" as kinds of derivative work, so I think a court would have little difficulty admitting that a work has two copyright holders, even if one person only removed material. – apsillers Jul 19 '20 at 17:47
  • @apsillers Nothing in my answer claims that a condensation or abridgment is not a derived work. The claim is that chopping and rearranging material might be found to constitute new expression. If that is true, the the derived work has exactly the same set of copyright holders as the original work; the chopper and dicer has no rights over it. – Kaz Jul 20 '20 at 22:04
  • @apsillers Thanks for the link; paragraph 103 is quite useful here; I used it in the answer. – Kaz Jul 20 '20 at 22:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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