decoration decoration
Stories

GROKLAW
When you want to know more...
decoration
For layout only
Home
Archives
Site Map
Search
About Groklaw
Awards
Legal Research
Timelines
ApplevSamsung
ApplevSamsung p.2
ArchiveExplorer
Autozone
Bilski
Cases
Cast: Lawyers
Comes v. MS
Contracts/Documents
Courts
DRM
Gordon v MS
GPL
Grokdoc
HTML How To
IPI v RH
IV v. Google
Legal Docs
Lodsys
MS Litigations
MSvB&N
News Picks
Novell v. MS
Novell-MS Deal
ODF/OOXML
OOXML Appeals
OraclevGoogle
Patents
ProjectMonterey
Psystar
Quote Database
Red Hat v SCO
Salus Book
SCEA v Hotz
SCO Appeals
SCO Bankruptcy
SCO Financials
SCO Overview
SCO v IBM
SCO v Novell
SCO:Soup2Nuts
SCOsource
Sean Daly
Software Patents
Switch to Linux
Transcripts
Unix Books

Gear

Groklaw Gear

Click here to send an email to the editor of this weblog.


You won't find me on Facebook


Donate

Donate Paypal


No Legal Advice

The information on Groklaw is not intended to constitute legal advice. While Mark is a lawyer and he has asked other lawyers and law students to contribute articles, all of these articles are offered to help educate, not to provide specific legal advice. They are not your lawyers.

Here's Groklaw's comments policy.


What's New

STORIES
No new stories

COMMENTS last 48 hrs
No new comments


Sponsors

Hosting:
hosted by ibiblio

On servers donated to ibiblio by AMD.

Webmaster
RangeCheck was the only thing *not* improved by TimSort... | 151 comments | Create New Account
Comments belong to whoever posts them. Please notify us of inappropriate comments.
RangeCheck was the only thing *not* improved by TimSort...
Authored by: Anonymous on Sunday, May 20 2012 @ 06:39 PM EDT

Well almost.

But according to Bloch's testimony, the sequence of events was roughly:

  1. Long before Android, the (slower) sort code in Sun's arrays.java used RangeCheck to generate the error messages/exceptions returned to apps/applets that called the sort method with various kinds of bad parameters.
  2. The initial (before TimSort) Android implementation of the sort method for arrays contained non-infringing code that emulated RangeCheck error messages closely enough to work in real life, and any differences in behavior from the Sun implementation would thus have become an implicit part of the Android API.
  3. Then Bloch wrote the Java port of Python's TimSort and provided a license to both Sun and Google. All that new code is legally in both products with rights belonging to each party. No one has disputed that, and phase 1 is over, so that is now a hard fact of the case.
  4. In the copies of TimSort Bloch gave to Sun, he reused the exact RangeCheck code from Sun's existing arrays.java. He did that to ensure that the error messages would not be changed by making arrays.java use TimSort in place of its old sort code, thus minimizing the risk of incompatibility with previous versions of Sun's arrays.java. This was legal because the 9 lines remained Sun's property available only from Sun. Bloch has testified, and this is undisputed, that he assumed a Sun engineer would paste the TimSort code into Sun's arrays.java, eliminating the extra copy of RangeCheck. The copy of RangeCheck in Sun TimSort was there only to allow Sun test engineers to verify that the TimSort code would be a perfect fit for the merge, when not changing the RangeCheck code.
  5. In the copies of TimSort Bloch gave to Google, he did not insert a similar temporary copy of the exact RangeCheck-like code from the existing Android arrays.java, but assumed somebody else would do it, and simply handed them the same file he had given to Sun, including 9 lines that were Sun's private code. This infringes Suns copyright in those 9 lines (Jury so ruled, Google is guilty under the law for this). Problem was that nobody did that work, and the 9 wrong lines shipped in millions of phones. This was no benefit to Google, as any functional difference between the sort error messages in Sun arrays.java and Android arrays.java would thus be changed, thus changing the Android API in a potentially incompatible way (precisely what Bloch was trying to avoid in his contribution to Sun). So copying the 9 lines RangeCheck was either harmful to the reliability and performance of Android or had no effect at all.
  6. In 2010 or 2011, Oracle/Sun spotted the 9 lines that that should have been replaced before the 2009 release and told Google (in the most impolite way possible). So Google looked closely at the code and replaced it by something belonging to Google, possibly the code from the original Android arrays.java, perhaps by new and different code.

However the technical harm of putting the Sun RangeCheck behavior in the Android TimSort, where the Android 1.1 sort error logic should have been is strong proof of 0 benefit, especially (I have not checked the various file versions in git, sorry) if it can be shown that the replacement code now in Android restores the original Android error handling, fixing the bug introduced by those 9 wrong lines.

Note: There may have been some information that the original RangeCheck was written by Bloch back in the day, but this doesn't really matter.

[ Reply to This | Parent | # ]

Groklaw © Copyright 2003-2013 Pamela Jones.
All trademarks and copyrights on this page are owned by their respective owners.
Comments are owned by the individual posters.

PJ's articles are licensed under a Creative Commons License. ( Details )