Google, Oracle get technical in court

The scene of the Oracle-Google trial yesterday was more like a computer-science classroom than a courtroom, as the witnesses explained the inner workings of Java and APIs.

Mark Reinhold, Oracle Java Platform Group chief architect, gave a tutorial on Java as part of his testimony. He spent nearly 14 years at Sun as principal engineer for Java SE and OpenJDK before Oracle acquired Sun.

The questioning mostly focused on the 37 Java APIs at the centre of the lawsuit. Reinhold, dressed in a dark jacket and red tie like Oracle CEO Larry Ellison was for his testimony, provided the attentive jury with definitions of the Java programming language, Java APIs and class libraries, but also got into the technical weeds with documentation extractors, compilers and comments that begin with a slash and two stars.

More simply, he explained that the APIs and class libraries are not in the Java language, in the same way that the Oxford English dictionary doesn’t contain every word in the English language.

Under direct examination by Oracle’s lawyer, Michael Jacobs, Reinhold said that only a small number of classes are required for the Java language, and that the bulk of the 37 APIs that Oracle claims Google infringed upon, are not required by the Java language, but there are a few APIs tightly related to the Java language that are necessary for Java development. He was also asked about copyrights and the Java specification, and said that each page of the language specification includes a copyright notice. Google maintains that the APIs are not copyrightable.

Google’s counsel, Dan Purcell, followed up on the API issue with questions about the authorship and the variety of Java APIs. He tried to establish that 10 per cent to 20 per cent of Java API packages were written by members of the Java Community Process, not Sun or Oracle. Of the 37 APIs in question, 10 were created with other members of the Java Community Process, he stated, who were not paid for their work by Sun or Oracle.

(Credit: Oracle)

He walked with Reinhold through the dense forest of Java implementations, configurations and profiles of four Java platforms — ME, SE, EE and Card — and different APIs for each one. The “write once, run anywhere” philosophy doesn’t necessarily apply across the different Java platforms, given the different APIs across all the platforms.

Purcell asked Reinhold more technical questions about the relationships of APIs, libraries and source code, and played snippets from his video deposition to highlight possible contradictions in his testimony. At one point, Reinhold responded to Purcell’s question about accessing source code in libraries in programming speak: “I’m sorry, the question is malformed,” Reinhold said.

Upon redirect, Reinhold explained his “malformed” comment, stating that “there is no source code in libraries … libraries are in object form, in zeros and ones.”

Homing in on “range check” code

Next up on the witness stand was Joshua Bloch, a former distinguished engineer at Sun and a Java guru who joined Google in 2004. Jacobs led Bloch through a tutorial of best practices for developing APIs and class libraries to help establish a creative works argument for copyrighting APIs. Bloch was quoted as stating that API design is a noble and rewarding craft, and that API design is tough.

Bloch was asked whether “range check” code — nine lines of code — that he wrote while he worked at Sun, was used for Android. “I don’t recall,” he said. Jacobs showed code for Timsort.java (Android) and Arrays.java (Sun), which both included “range check” that Bloch agreed were almost the same. Bloch said he was aware that Sun copyrighted code during his work there.

According to a Google spokesman, the “range check” code is not in the latest Android version shipped by the company.

Bruce Baber, representing Google, also took Bloch through the “range check” topic. Bloch said that “any competent high school programmer could write it”, and that he wrote Timsort.java, porting open-source code from the Python language to Java in the middle of 2007, when he was not part of the Android team. Timsort.java was contributed to the Open JDK by Google under the GNU General Public Licence version 2 in 2009. “I really feel a personal responsibility to give back to the Java community. It made my career,” he said.

Baber walked Bloch through a lengthy definition of API. He defined an API as “names or words and a set of rules”. When the program speaks to a library, it has to speak in a very precise language, he continued. Typically, the words are verbs and phrases, such as “remove the header”.

He added, through Baber’s prompting, that an API is not a blueprint that tells you how to build or implement something. Baber asked Bloch to explain naming conventions in Java APIs — packages, classes and methods.

Judge William Alsup then asked Bloch to explain how packages, classes and method apply to Java APIs. Bloch said the API would be like an address, the package a city, the class a street and the method a house number.

Baber asked whether APIs are needed to use the Java language as specified in The Java Language Specification, Third Edition (PDF). “Many of APIs are referenced directly in the Java specifications,” he said; 60 classes directly mention consisting of more than 750 public methods and field spread across three classes.

In order to faithfully implement the Java language, there are also indirect dependencies, Bloch stated, including 177 classes consisting of over 2000 methods and fields spread over 10 packages.

Bloch and Reinhold both said that the Java language is mostly useless without APIs, and that other object-based languages have APIs.

Baber then moved on to the topic of re-implementing or doing further work on existing APIs. To set the stage, Bloch dictated a simple API, for computing the maximum, which Baber wrote on a flipchart to demonstrate the code. Bloch then came down from the witness stand to help with the tutorial, clarifying the package, classes and methods for an API. He wrote out a simple argument — a parameter, the values that are passed to an API — to show the implementation side of a computer program, separate from the AP, to the jury.

Back to re-implementing APIs, and sharing Google’s view on using Java APIs, Bloch gave an example of working with Classpath, an open-source project, to develop class libraries independently from Sun.

Jacobs returned for redirect, pursuing the notion of APIs as creative works. He asked Bloch what he meant about creativity and APIs. He said that his notion of creativity and artistry is “obeying simultaneously all the rules of the craft to produce a language, API, that is easy for the programmer to use”.

Via CNET

You can skip to the end and leave a response. Pinging is currently not allowed.

Leave a Reply

Powered by WordPress | Designed by: Premium WordPress Themes | Thanks to Themes Gallery, Bromoney and Wordpress Themes