Programming is partly logic, partly art
The difficulty for the justices who I assume are not programmers is that programming is partly logic, partly art. Copyright is simple when it comes to art - Harry Potter is a creative work, if I wrote a book and had a school called Hogwarts I would be obviously copying it as I could have called the school anything else.
But when it comes to programming, there are many ways to express something (which is why programmers argue endlessly over languages and styles) but only so many ways to implement something. So if someone has a function called rangeCheck I could call my function examineTheRange just to be different, but I'm doing the same thing. I need to check if one number is greater than another, etc. I can call my variables what I like but I can't change what the function does. Logic means you can't make up what you like, art means you can - and software is a bit of both. This is going to be hard to understand for the justices because Oracle are going to use analogies with literature. But literature isn't a good analogy because you can always do whatever you like in your own novel. In programming you can't. And classes of functions are going to be limited - a File API would have open, close, read, write, etc - even if called something else to get around a copyright troll.
What's needed is an update of international copyright agreements, a Berne Convention 2, that fully recognizes that software is different from literature. And protects APIs from being copyrighted by recognizing them as logical expressions rather than creative works.