I think that we have 2 types of files being copied here. One is in fact the API contract and this was the potential industry-killer. Recently the heir to SCO arose from the swamp muck in which we though it was safely long-dead and buried and resumed its litigious ways. Now imagine them latching on to an Oracle-favoring decision and shutting down the entire world until it sent in royalty payments for
stdio.h and its ilk.
It may be that all 12,000 lines claimed were in fact API specifications. Java is, after all a very rich environment. But Sun also contributed heavily to the open-source ports of Java, which is where you could make claims on the actual implementation of things like
java.lang.String. I'm doubtful that this was part of the suit because there is already plenty of precedence for the legal principle of "No takey-backseys", meaning that once made available, you cannot pull the rug out from under someone unles the license granted expressly says you can (and there is absolutely no way that outfits like Red Hat would have provided IcedTea and OpenJDK under such restrictions). In fact. the usuage strategy when attempting to close what was open is to keep the original system open-source and make future extensions and maintenance closed, which is essentially what Oracle is moving to as they attempt to monetize future Java versions.
Yes, you can copyright an implementation of
java.lang.String. However, previous case law has already determined that you cannot then use that as a platform to play dog-in-the-manger on anyone else who wants to implement their own
java.lang.String. It's the difference between Shakespeare claiming protection for a Dark Lady sonnet and claiming exclusive ownership of every sonnet ever written. Even specific lines of code are hard to claim, as it has long been established that if the Universe itself establishes constraints on implementation, then the implementation cannot be copyrighted. That is, Einstein could never claim E=mc2 as his personal property.
Copyrights are problematic. On the one hand, people like Beethoven, Dickens and even Tolkien have complained about unauthorized copying depriving them of a living. On the other hand, Sonny Bono and his cronys have made it possible not only for authors to become parasites decades after their works were created since there's no financial incentive to keep creating new works, it makes it possible for multiple generations who haven't the slightest drop of creativity of their own to
profit at the expense of the general public. It's one thing to make a living and provide for your heirs, and quite another to quash creativity far into the future.
Courts, as we repeatedly have seen can make decisions that can make a royal mess of the world when the law is decided and enforced strictly on legal grounds with no attention to practical consequences. So I'm very, very glad that Oracle lost.