Judge Alsup: The copyrightability of the 37 APIs is my call. But
I want more briefing on it. I want you to take a firm position.
Could you get a patent on structure, sequence, and organization (SSO)?
Say "yes" or "no". You might want to read Mark's most recent
Also, do you know if the copyright office investigates SSO of
copyrighted source code? I would guess not.
[Google answers "no", Oracle answers "maybe yes, maybe no"; I'm not
sure which question this refers to.]
[Copyright office only gets first 50 lines and final 50 lines of
the source for a SW copyright registration, so of course they
don't look at SSO.]
Judge Alsup: OK, what about derivative works? Does the plaintiff
have to prove that the source work was actually used? What if it
was accidental overlap?
Oracle: Proof requires access, plus substantial similarity.
Google: Unauthorized work has to include copyrightable material.
Judge Alsup: When Google did their clean room implementation, did
they have access to the English language comments [in Java source]?
Google: Yes, they had the English language prose descriptions of the APIs.
Judge Alsup: Does that make it a derivative work?
Google: The fully-qualified names are the organization.
Judge Alsup. I have to decide on copyrightability, not the jury.
You don't have to do exact copies, e.g., you could use science.sqrt()
as your method rather than math.sqrt()
Google: It wouldn't work; existing code wouldn't find it.
Judge Alsup: Is fair use a question for judge or jury?
[1:30 or so, Judge leaves the courtroom]
The other big news, which you'll find in update 5, the rest of the Joshua Bloch testimony is that the lines of code that Oracle claims are copied that Bloch wrote were donated to Sun and Java by Bloch himself. Sun incorporated it into Java and praised it for being faster than what they had already. Get a load of this:
Q. You left Sun and joined Google in 2004. What did you do at Google?
Now Oracle is suing over that very code. That doesn't make Oracle look so good. In fact, they look a teensy bit petty.
A. I ported existing Google infrastructure that was primarily
accessible from C++ so that it was accessible to Java. I joined
the Android team in December 2008 or January 2009. Android had already
been released, and phones were in the market.
Q. When you joined, what was the status of Android's Java run-time
A. Not as fast as they could be, and there were some bugs.
Q. Did you have any influence on the choice of APIs?
Q. Did you ever consult Sun source code or Sun materials?
Q. Did you change any of the APIs?
A. No, you can't. It would make it incompatible.
Q. What is Timsort?
A. A way of putting a list in order [somewhere in here there is
reference to compatible Timsort (?)].
Q. How big is Timsort (referring to Bloch's Java implementation).
A. 900 lines.
[The rangecheck() function gets mentioned in here.]
Q. Was there a sort API in Java before Timsort?
A. Yes, in the arrays (class? package?).
Q. How did Timsort differ?
A. It was much faster: as much as 20 times, typically somewhere between
2 and 20.
Q. How big is the rangecheck() method? Is it a private or
A. It's a private method, about the same size as max() (so: small).
Q. What does rangecheck() do?
A. It's necessary when you have a sort method and you might
be sorting a partial list or a whole list. You need to check that
the indices are within range. It would be an error if an index was
negative, or the indices are in the wrong order, or are not within
range of the list.
Q. Is rangecheck() simple or complex?
A. Very simple. Any high school programmer could write it.
Q. Do you know of the existence of other rangecheck() functions?
A. Yes, there's one in arrays.java. I wrote it.
[Timsort: from Tim Peters, and originally in Python. The Java
implementation was a port.]
Q. Where did you get the Python version of Timsort? Was it open
source [this was 2007, pre-Android]?
A. Yes, Guido [van Rossum] pointed me to it, it's under a permissive
Q. What did you want to do with your Java Timsort?
A. Put it into OpenJDK (an open implentation of the SE
Q. Who controlled OpenJDK?
Q. How does someone contribute to OpenJDK, and had you done it before?
A. Yes. [Discussion about source repositories, and Doug Lee at Oswego, NY].
Q. If you worked for Google, why would you contribute to Sun's JDK?
A. Java is important to me; it's given me a lot.
Q. Why did you use the same rangecheck() function in Timsort as was in
A. It's good software engineering to reuse an existing function.
Q. But why use the exact same code?
A. I copied rangecheck() as a temporary measure, assuming this would
be merged into arrays.java and my version of rangecheck() would go
[Discussion of Timsort dates and Android work dates.]
Q. Was Timsort accepted and added into OpenJDK?
[Something about Java 7.]
Q. Did Sun ever say anything about Timsort?
A. Yes, Mark Reinhold praised it for its speed on his blog.
Q. What else did you contribute to Java 7?
A. ARM Block: Automated Resource Management. Like automatically
closing a file. This wasn't just an API, but a language feature. It
added to the language itself and changed the grammar.
Q. Is it often that case that the language and the APIs change in tandem?
Q. Are the 9 lines of rangecheck() currently in Android?
A. No, not in Ice Cream Sandwich; I checked.
Q. Are you still contributing to Java?
A. Lots. I feel a personal responsibility to give back to the Java
Q. Have other people at Google contributed to Java?
And the other point that struck me is that he was asked whether you can use the Java language without APIs. This obviously matters, in that it would be pointless to tell the world that you can use the language but not the APIs if in reality you can't use the language without the APIs: