A few years ago, the database company Oracle sued Google, arguing that Google's Android operating system infringed the copyright of Oracle's Java technology. On Friday, a federal appeals court sided with Oracle in the long-running dispute.

The decision seems to reflect a fundamental lack of understanding of how software works. And it could create serious headaches for companies that want to make their software compatible with that of competitors.

Why did Oracle sue Google?

The lawsuit focuses on technical decisions Google made when it created the Android operating system.

"Not only do they not understand how computers work, they can't even read"

Google wanted people who wrote programs in the popular programming language Java to be able to re-use their code in Android apps. To do that, Google had to ensure that Java code written for other purposes ran exactly the same on Android. But negotiations with the company behind Java, Sun Microsystems (which was later acquired by Oracle), broke down, so Google decided to create its own version of Java from scratch.

For example, the Java language includes a function called "max," which lets a program compare two numbers and see which of them is larger. For Android to be compatible with Java, it needs to have its own version of the "max" function, and that function needs to be called "max," so programmers don't need to re-write their programs. It needs to be structured like the original "max" function, for example by taking in two numbers rather than, say, a list of numbers. Java has dozens of functions like this. For each of them, Google copied the name and other functional details, but wrote its own code to implement these functions.

Oracle sued, arguing that this was copyright infringement. It says that the list of Java functions constitutes a creative work, and that Google infringed Oracle's copyright when it included functions with the same names and structures.

How did the courts respond?

The trial court judge, William Alsup, sided with Google. Copyright only protects the creative aspects of a work, not its functional characteristics. Judge Alsup ruled that because the names of Java functions was essential to achieving interoperability, they were a functional characteristic rather than a creative aspect of Java, and using them wasn't copyright infringement.

But on Friday, the Federal Circuit Court of Appeals disagreed. The court was unimpressed with Google's argument that function names were functional characteristics not protected by copyright. In the Federal Circuit's view, the list of Java functions was just another kind of "code" that couldn't be copied without its creator's permission.

Does that make any sense?

The court's reasoning didn't impress James Grimmelmann, a copyright scholar at the University of Maryland. "Not only do they not understand how computers work, they can't even read," he says.

The court cited a seminal 1992 decision that allowed third party developers to create games for the Sega Genesis console. In that case, Sega made an argument a lot like Oracle's — that a game maker called Accolade infringed Sega's copyright in trying to create unauthorized Genesis games. But the Ninth Circuit Appeals Court sided with the video game maker, ruling that the functional characteristics of the Sega platform — such as the set of commands that allow a game run on the Genesis console — were not eligible for copyright protection.

Yet the Federal Circuit reached the opposite conclusion, holding that the list of commands that allow programs to invoke Java features was copyrightable expression.

Why is that a big deal?

There's a long tradition of computer programs being designed to be compatible with those of third parties. To do that, the developer of the new software needs to copy certain functional characteristics of the old software. And often, software companies have good reasons to do this even when the author of the old software objects.

The decision could make it easier for a company to sue a former employee

One good example is the open source project Samba. It was created to allow users of open source operating systems such as Linux share files with Windows users. To do that, the Samba programmers reverse-engineered and then duplicated the functionality of the Windows file-sharing system. They didn't copy any Microsoft software; they simply duplicated the sequence of commands needed to transfer files, read the contents of folders, and perform other functions in the Windows file-sharing system.

Samba has become hugely popular. Not only did Apple incorporate Samba into some versions of Mac OS X to allow Macs and PCs to communicate, many third-party companies also used Samba to build stand-alone file servers.

The Federal Circuit has shown a consistent bias in favor of patent holders.

The legality of projects like Samba has been widely accepted for more than two decades. But under the Federal Circuit's logic, Microsoft might be able to sue a Samba for copyright infringement. If the Federal Circuit's precedent isn't overturned, companies could become more reluctant to reverse-engineer competitors' products in order to make them compatible.

Grimmelmann also warns that the vague language of the decision could open the door to frivolous litigation. For example, the decision could make it easier for a company to sue a former employee if he goes to a new employer and writes software similar to the code he wrote at his old job. Even if the programmer writes the new code from scratch, courts could find that it's similar enough to the old code to trigger copyright liability.

What is the Federal Circuit and why did they hear this case?

The Federal Circuit is the court that hears appeals in all patent cases. Over the last three decades, it has shown a consistent bias in favor of patent holders, setting legal precedents that made the current patent troll problem possible.

Ordinarily, copyright cases in California would be heard by the US Court of Appeals for the Ninth Circuit. But because Oracle's fight with Google also includes some patent issues, the Federal Circuit gets jurisdiction.

And evidently, the Federal Circuit has a bias toward copyright holders to go with its pro-patent bias.

What happens now?

Grimmelmann believes Google is almost certain to appeal the ruling. The ruling could be re-heard by a broader panel of Federal Circuit judges or reviewed by the Supreme Court. The case is likely to attract broad interest in the software industry in the coming months.

If those appeals fail, Google still has another way to win. The case will go back down to Judge Alsup to consider the argument that Google's use of the Android function names is permitted by copyright's fair use doctrine. Alsup's ruling would then need to be appealed again, either by Google or by Oracle. So this case could drag on for many more years.