Oracle Claims Google Copied Java Code – Not So Fast, Though

Now, this is an interesting development in the ongoing war against Android. Oracle didn’t just sue Google for allegedly infringing its Java patents; it also claimed copyright infringement. Oracle has amended its complaint, and, fair is fair, they’ve got the code to prove it: indeed, Android contains code that appears to be copied verbatim from Java – mind you, appears. However, the code in question comes straight from Apache’s Harmony project, which raises the question – would a respected and long-established cornerstone of the open source world really accept tainted code in the first place?

The amended complaint reiterates the patent claims, but also goes into more detail about the copyright infringement part of the lawsuit. Oracle trots out some code comparisons of the ‘PolicyNodeImpl.java’ class library, and compares Oracle’s version with that of Android – the parts look identical (but might not be – more below). Interestingly enough, this isn’t really Google’s code; it’s code from Apache’s Harmony project.

“In at least several instances, Android computer program code also was directly copied from copyrighted Oracle America code,” Oracle states in the amended complaint, “For example, as may be readily seen in Exhibit J, the source code in Android’s ‘PolicyNodeImpl.java’ class is nearly identical to ‘PolicyNodeImpl.java’ in Oracle America’s Java, not just in name, but in the source code on a line-for-line basis.”

Since this code comes from the Harmony project, which is part of Apache, I’m really wondering just how much merit Oracle’s complaint has. Oracle is being disingenuous by claiming Google copied code from Oracle, while it’s quite clear the code has actually been taken from Harmony. Of course, if Harmony has no right to use this code, then Google is also liable. However, the reverse is also true – if Google is found to have violated Oracle’s copyright with this piece of code, then so did the Harmony project.

It gets weirder, though. While the code in the Android source tree states it’s Harmony code, this class can actually not be found in the current Harmony source.

Then there’s the fact that this piece of code actually seems to be testing code, as in, code that doesn’t actually ship on devices (can anyone please confirm this?), which, I think, is also an important distinction, as Oracle claims we’re talking about code shipped to customers on devices.

But there’s more. The code indeed looks copied, but is it, really? Carlo Daffara generated a diff of the two files, which paints a slightly different picture. According to a comment over at Groklaw (I know, I know, but he makes a good point), any similarities can easily be explained by “using the same naming convention for variables and the widespread use of automatic code generation in the Java community”.

This is not as clear-cut a matter as it seems, but I’m sure the usual suspects will rail on Google anyway. Surely more to follow.

74 Comments

  1. 2010-10-28 8:17 pm
  2. 2010-10-28 8:41 pm
    • 2010-10-28 8:56 pm
      • 2010-10-28 10:45 pm
        • 2010-10-28 11:19 pm
          • 2010-10-28 11:41 pm
      • 2010-10-29 2:47 am
        • 2010-10-29 6:49 pm
    • 2010-10-28 11:07 pm
    • 2010-10-29 3:19 pm
    • 2010-10-29 10:52 pm
      • 2010-11-01 11:27 am
        • 2010-11-01 12:23 pm
        • 2010-11-01 1:45 pm
  3. 2010-10-28 8:51 pm
    • 2010-10-28 10:49 pm
      • 2010-10-29 2:37 am
        • 2010-10-29 6:32 pm
          • 2010-10-29 10:54 pm
          • 2010-10-30 12:43 am
      • 2010-10-29 6:26 pm
  4. 2010-10-28 9:06 pm
    • 2010-10-28 9:11 pm
    • 2010-10-29 7:14 pm
  5. 2010-10-28 9:08 pm
  6. 2010-10-28 9:12 pm
    • 2010-10-28 9:16 pm
      • 2010-10-28 9:26 pm
        • 2010-10-28 9:34 pm
      • 2010-10-29 5:39 pm
    • 2010-10-29 5:39 am
      • 2010-10-29 1:22 pm
      • 2010-10-29 9:21 pm
  7. 2010-10-28 10:06 pm
    • 2010-10-28 10:15 pm
    • 2010-10-29 9:41 pm
      • 2010-10-30 6:20 am
  8. 2010-10-28 10:10 pm
    • 2010-10-29 4:43 pm
  9. 2010-10-28 10:13 pm
    • 2010-10-28 11:04 pm
    • 2010-10-29 12:47 am
    • 2010-10-29 12:59 am
      • 2010-10-29 1:04 am
      • 2010-10-29 1:26 pm
    • 2010-10-29 1:33 am
  10. 2010-10-28 11:00 pm
  11. 2010-10-28 11:41 pm
    • 2010-10-28 11:58 pm
      • 2010-10-29 1:51 am
        • 2010-10-29 2:30 am
          • 2010-10-29 10:16 am
      • 2010-10-29 2:25 am
    • 2010-10-29 11:01 pm
  12. 2010-10-29 1:23 am
  13. 2010-10-29 8:59 am
    • 2010-10-29 9:18 am
      • 2010-10-29 12:33 pm
        • 2010-10-29 9:38 pm
  14. 2010-10-29 9:16 am
  15. 2010-10-29 10:32 am
    • 2010-10-29 12:50 pm
    • 2010-10-29 1:34 pm
  16. 2010-10-29 10:47 am
  17. 2010-10-29 12:42 pm
  18. 2010-10-29 3:45 pm
  19. 2010-10-29 8:46 pm