At what point can a computer-generated file infringe copyright? In general it is illegal to download a copyrighted file without paying the copyright owner. But is having metadata (hash) of the copyrighted material legal? What if I've run a program (like Mathgen) that generates random documents and at some point it generated the copyrighted material? Another example: my program generated a two-line program extracted from pi that by chance (or perhaps not) is copyrighted (like IEFBR14 which has around 10 words). Does my program's output infringe that copyright?
Copying is illegal, creating an identical work by coincidence isn't. If it is not a criminal case, then a court decides whether it is more likely that the identical work was created by copying or by coincidence. Creating an identical work through a random process isn't going to happen, claiming this would be an awful defense. On the other hand, it is quite possible that two software developers using very stylized code adhering to struct coding conventions can produce quite large bits of identical code. Your links titled "metadata" and "hash" don't actually link to a description of metadata, or the description of a hash, but to a description of torrent files, which is something totally different. Systematically distributing files whose only purpose is the illegal duplication of copyrighted works should not be done without consulting a lawyer, as has been said on other threads (whether posting links to copyrighted files is legal). The chances that a random process will generate a file identical to an existing copyrighted file of say over 100 bytes are virtually zero. If there is an illegal copy of a copyrighted file, and you claim that you created it through a random process and coincidence, you will lose, and deservedly so.
There is no provision for automatically relicensing infringing works (for example, distributing a program that contains parts covered by the GNU GPL and that is therefore a derived work will not automatically place the infringing program under GPL, even if that is the expected way for derived works to comply with the license. Instead, the derived work becomes at the very least undistributable, as there are competing copyright holders that disagree.
No. You may not do this. As your post points out this is a blatant copyright violation. It isn't remotely in the realm of fair use.
Physical content The main consideration with physical content is that reading it does not require making a copy, so uncomplicated copyright law is what’s relevant. Copyright law is about making copies (also distributing). Purchase a novel (a physical book which was legally obtained). There is no copying involved (you do not in fact make a copy in your mind, if you're a human). Under the First Sale doctrine, once a copy is sold by the rights-holder (e.g. the publisher, initially to the bookstore or distributor), that owner can do whatever it wants with that specific copy, including reading or re-selling (and anying thereafter can likewise). Books are sold, not licensed. Copyright relates to copying, not reading. It’s true that all (legal) rights are reserved, but the power to prevent resale is not a right. Book (or anything else) on the ground. As above, with the complication that you aren’t at least immediately the rightful owner. But, you don’t have to be the owner of a protected work to read it (otherwise libraries would not exist). The rightful owner might unsuccessfully try to sue you for reading their property, but reading does not cause damage, and your act is innocent (not even negligent), and not wrongful. Eventually (depending on jurisdiction) you may become the owner if the original owner does not reclaim the book. Reading a copy made by someone else. See above about the relationship between reading and copyright. The teacher might maybe be liable for infringement, but you are not culpable (assuming you didn’t encourage the teacher to make an illegal copy). Digital content However, every item of digital content has to be copied many times, in order to actually be read. E.g. a copy is made to video display memory from RAM, which is copied some number of times from RAM to RAM as the program formats and sizes, ultimately reading a copy stored on disk storage (which is installed from.... using N temp files) Typically what happens is that you acquire a copy of a license to use the content. Some number of copies may be statutorily permitted, e.g. the myriad transitory copies created across the internet as you download the work, or on your computer as you install it. The law addresses this matter in part at 17 USC 117, saying that it is not an infringement for the owner of a copy of a computer program to make or authorize the making of another copy or adaptation of that computer program provided: (1) that such a new copy or adaptation is created as an essential step in the utilization of the computer program in conjunction with a machine and that it is used in no other manner, or (2) that such new copy or adaptation is for archival purposes only and that all archival copies are destroyed in the event that continued possession of the computer program should cease to be rightful. Since Congress chose the word “program” rather than “file”, the plain reading of this is that permission is always required to read digital content. One may assume, when you purchase an electronic book at the store (you thus own the recording medium), that the work also comes with specific permission to make those automatic copies required to actually read the book on a computer. In order to read the book you must make some number of copies. Seeing stuff on a web page. Let’s also assume that the material is on the page without permission, but you don’t know that, and it just jumps out at you. This raises an interesting question regarding statutory language and web pages. The statutory language is not at all clear about link-clicking (the statutes don't say anything about "links"), and I don't know of any relevant case law (probably because it would be ludicrous to go after an innocent link-clicker) Infringement is defined in 17 USC 501(a): Anyone who violates any of the exclusive rights of the copyright owner as provided by sections 106 through 122 or of the author as provided in section 106A(a), or who imports copies or phonorecords into the United States in violation of section 602, is an infringer of the copyright and if you infringe, you may be liable. 17 USC 106 spells out those rights: the owner of copyright under this title has the exclusive rights to do and to authorize any of the following: (1) to reproduce the copyrighted work in copies or phonorecords; … (3) to distribute copies or phonorecords of the copyrighted work to the public by sale or other transfer of ownership, or by rental, lease, or lending; … When you go to a web page and click a link, are you reproducing the protected material? Or is the website owner reproducing the material, and pushing it onto you? I don’t know of any decisions that address this kind of technical question. There is no question that the person hosting the infringing material is liable, the question is whether you would be as well? It would be highly unjust to hold the innocent link-clicker responsible. There is a bit of protection for innocent infringement in 17 USC 405(b) Any person who innocently infringes a copyright, in reliance upon an authorized copy or phonorecord from which the copyright notice has been omitted and which was publicly distributed by authority of the copyright owner before the effective date of the Berne Convention Implementation Act of 1988, incurs no liability for actual or statutory damages under section 504 for any infringing acts committed before receiving actual notice that registration for the work has been made under section 408, if such person proves that he or she was misled by the omission of notice. In a suit for infringement in such a case the court may allow or disallow recovery of any of the infringer’s profits attributable to the infringement, and may enjoin the continuation of the infringing undertaking or may require, as a condition for permitting the continuation of the infringing undertaking, that the infringer pay the copyright owner a reasonable license fee in an amount and on terms fixed by the court. (c) Protection under this title is not affected by the removal, destruction, or obliteration of the notice, without the authorization of the copyright owner, from any publicly distributed copies or phonorecords. (You could be prevented from further use of the infringing material, and liable for specific lost profit). Infringement is not defined in terms of what you know or believe about the copyright status of work. Nevertheless, I would expect that in addressing the question of whether a person had in fact made a copy that they would look at the mental state of the individual, looking for mens rea. This could distinguish clicking a link that unexpectedly pushes protected material onto you, versus attempting to obtain protected material by clicking on a link.
It seems that you don’t understand what parody is. If you do understand, please explain how it’s even possible to parody computer code. What you can do with “open source” code depends on the licence the copyright holder(s) release it under. For some very permissive licences you can do what you suggest, for most, you can’t.
You are creating a derivative work. You are only allowed to do this if the library comes with a license that allows this. If you want to give your derivative work to anyone else, copying it is copyright infringement unless the license allows it. Copying the derivative work and attaching a different license is most likely to be copyright infringement. And if people receive a copy with an open source license that is not justified and rely on it, that’s creating one unholy legal mess for everyone involved and can be massively more expensive than plain copyright infringement. No license means you don’t have permission to do anything with it, not creating derivative work, not distributing it, and certainly not publish it with an open source license.
First off: Legally, everything is copyrighted anyway. Licensing is not at all necessary. Hence, even if a court would disagree with # SPDX-License-Identifier: Apache-2.0, that would just make it closed source. Having said that, the law generally doesn't bother with trivialities such as &quot;file headers&quot;. Any commonly accepted way to state the copyright and license terms is OK. Your LICENSE is such a common convention. If you want to avoid all doubt what is covered under that license, put a reference to that LICENSE in each header. If you have just five files in one directory that are all licensed the same, I wouldn't even bother with that. Again, the default position is that everything is closed source.
It is clear that facts are not subject to copyright but the expression of them can be copyrightable. From your question it sounds like you are on solid ground but specific things you end up doing may or may not be free of copyright issues. Certain ways of organizing information that involves some minimal creativity may qualify to be copyright protected so your compilation might be protectable as a whole. You should look into the European protection for databases. It is not, like most of the rest of copyright law, based on minimal creativity but on the effort it takes to compile and maintain. From your question, this might help you protect your work rather than hurt your creation of your work.