Oracle says Google directly copied Java code: Here's the line-by-line comparison

Oracle says Google directly copied Java code: Here's the line-by-line comparison

Summary: Oracle amended its Java complaint against Google over Android patent infringement and provided line-by-line comparisons in its exhibits.

SHARE:

Oracle amended its Java complaint against Google over Android patent infringement and provided line-by-line comparisons in its exhibits.

In its tweaked complaint, Oracle ups the ante against Google, who has called the lawsuit baseless. Oracle, which first sued Google over Android in August, said:

In at least several instances, Android computer program code also was directly copied from copyrighted Oracle America code. 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.

Indeed, if you look at those exhibits the lines of code are identical.

The amended complaint and Oracle's key exhibits are embedded below via Scribd. Judge for yourself.

The complaint:

oraclegoog102710complaint

And the key exhibits:

orclgoogcode

orclgoogcode2

Topics: Open Source, Google, Oracle, Software Development

Kick off your day with ZDNet's daily email newsletter. It's the freshest tech news and opinion, served hot. Get it.

Talkback

180 comments
Log in or register to join the discussion
  • out of my depth here but...

    can anyone do the honours of elaborating to me how the second one infringes on an open source platform. for me the whole bit of how google competes directly with java as a software platform just isn't settling in.

    oh and side note. interesting to see this case wake up again. Oracle sure is going gung ho on their lawsuit bit.
    eddyrox1@...
    • RE: Oracle says Google directly copied Java code: Here's the line-by-line comparison

      @eddyrox1@... Java is a platform (as well as a language). Android is a platform that uses Java language. The crossover is clear - both platforms.

      I don't think Oracle had any real choice here - they have to protect their IP. I don't actually like it, but I can see that if Google's Dalvik becomes more popular than JRE then Oracle's investment in Java is compromised.

      If this is true that Google just used Oracle's code then I can't see Google being able to defend that. I'm sure deep in the Googleplex some engineers are probably scrambling to create clean re-implementations of the affected code - maybe this won't go anywhere.

      I don't think Google can afford to lose this, though it does make you wonder why Google didn't buy Sun Microsystems when they could... ?
      Jeremy-UK
      • RE: Oracle says Google directly copied Java code: Here's the line-by-line comparison

        @Jeremy-UK The Java source code is licensed under the GPL. Android's code is under similar licenses (although I'm not certain precisely what these two files are under). Point being, copying is _encouraged_ and I find it hard to believe that Google would have done something blatantly wrong. Still, the example does not obviously look like copied code to me. It looks like replicating functionality using different but similar code. The naming collisions can easily be explained by following well known Java naming conventions. Granted, to the untrained eye it looks a lot like they just changed the names of some things and the spacing. However, you have to bear in mind that this code is the implementation of a particular well known interface. That means it has to function in a very specific way in order to work at all. Therefore, even a cleanroom implementation is going to be substantially similar. It seems to me like Oracle is playing things up hoping for ignorance on the part of the court.

        Ultimately, this hurts Oracle. But it doesn't matter to Oracle. They are safely off in their own little bubble and it seems acceptable to them to completely disregard everyone except people shoving cash into their furnace. Oracle is probably mighty upset that Sun released Java under GPL before selling the company and they are likely trying to reign it back under their control even if it means they drive away every single non-paid user. My experience is that Oracle has zero consideration for non-paying customers (e.g. even someone who bought something dreadfully expensive from them and failed to maintain expensive and unnecessary contracts) and is very, very controlling of its customers (unfortunately, I am now one of those customers and have felt the impact of other decisions they've made that has hurt Sun customers).
        cabdriverjim
      • RE: Oracle says Google directly copied Java code: Here's the line-by-line comparison

        Jeremy-UK: "If this is true that Google just used Oracle's code then I can't see Google being able to defend that."

        This shows you need some basic education on open source licensing. Sun (previous owner of Java) opened up Java to anyone who wanted to use it, for FREE, as long as they published any improvements and changes. IF they made no changes, they were still able to use it FOR FREE.

        Understand?

        So, Google copying the code was REQUIRED. You have to copy first before use, you have to copy first before making any changes.

        ORACLE, the new owner of Sun, does not like that Sun open sourced Java. How are they going to make money off it? Well.... the horse has left the barn.

        But, if Oracle can spread enough FUD (Fear, Uncertainty, Doubt) about using Java for free, they can extort money out of companies to PAY to use Java, even though they don't have to.

        Microsoft has used this tactic to make some Linux companies pay for Windows license. Just In Case. It's insurance against being sued.

        There are a couple of exceptions in Sun's open source license and ORACLE, the new owner, is pursuing that angle -- trying to prove that even though Java is open source, that Google's use falls under the monetary licensing plan.

        But your comments that Google can't defend copying OPEN SOURCE java code is laughable. It's supposed to be copied.
        ChazzMatt
      • RE: Oracle says Google directly copied Java code: Here's the line-by-line comparison

        @cabdriverjim<br><br>Sorry, but to my "trained eye" this looks like a poor copy job. Name collisions are one thing, but whose to say that ALL the private variables would be 1) named exactly the same as the Java ones, and 2) in the exact same order of declaration. Being private, there's absolutely no need for them all to have exactly the same names.<br><br>Moving on to the constructor, sure there are some differences in the names of the parameters, and some formatting, but the order of the logic is exactly the same as the Java version. <br><br>Come on. This was some lazy developer who decided to copy the Java one and change a few things to try to make it "his own". I would say, at the very least the Java one was definitely used as a reference, and while the developer might not have copy and pasted the code, they no doubt copied much of it verbatim, while changing some names and formatting (adding a brace here and there).
        tk_77
      • RE: Oracle says Google directly copied Java code: Here's the line-by-line comparison

        @ChazzMatt - My great-grandfather had a small Bakery in downtown Chicago in the early 1900's and paid a local man for "fire insurance" every week for cash and never had a fire as long as he paid for insurance. It would be interesting if the man he paid was Bill Gates' grandfather!
        Gr8Music
      • RE: Oracle says Google directly copied Java code: Here's the line-by-line comparison

        @Jeremy-UK what is sad is that last year Oracle was on the other side, until they bought a small company.... so what is this RELALY about?
        quentinjs
      • RE: Oracle says Google directly copied Java code: Here's the line-by-line comparison

        @Jeremy-UK In what way is Java a platform? please explain. If you look at the code, there are differences that I see. SO direct copying of code does not appear to totally true.
        iamanerd
      • The code is not the same...

        @Jeremy-UK
        If you look closely at the example you can see that it was not simply "copied". Yes, they use the same variable names but there is a lot of difference in the code.

        Oracle, go and F*** yourself!!! This is all nonsense.
        prof123
      • @prof123

        If you look closely, you can see it looks like a poor job of refactoring and little more.

        Do you think Google should be able to simply steal others work? This goes for Apple, MS or any large company. Not knowing the licensing of the specific files (but knowing Oracle knows IP law 100 times better than Google...) there is no way this is a clean room implementation.
        Bruizer
      • RE: Oracle says Google directly copied Java code: Here's the line-by-line comparison

        @Jeremy-UK <br>What some are forgetting is that the Oracle license of GPL is more restrictive than the Android licenses which some are Apache license. With open source, you cannot change the license of the code unless you are the author. With GPL all the code is linked together therefore it must all be GPL. Since Oracle via Sun wrote the code, they are the only ones who can add a license to it other than GPL. Oracle previously Sun would allow commercial licence for those who did not want to release under GPL. They charged for this of course. This ability to change the license is available to the author only. Using GPL for android would mean the companies which want to distribute their own code with Android would have to release that code under GPL and make it difficult to charge for it as anyone could take the code and make their own version. Also, it's hard to keep your special user interface if you have to give away the code for it under GPL. Given the classpath exception, code not put into the same file (e.g. jar/shared library) as the GPL code might be OK. Stealing the code but not using the GPL license for it is a game changer. This is clearly illegal and against the open source philosophy.

        I disagree with Oracle about the patents since it would be impossible to have open source if someone accused you of violating the patents for using the open source contains. Enforcing the patents makes open source meaningless.
        ibwiser
      • RE: Oracle says Google directly copied Java code: Here's the line-by-line comparison

        @prof123, bruizer:

        This is an obvious decompiling of Oracle code. That's why field names are kept, that's why parameter and variable names are generated, loops and conditionals transformed, private constant always inlined (but declaration nevertheless kept) and some gratuituous return statements appear where a human programmer would be very unlikely to use them.
        jacekszymanski
      • Refactored

        @tk_77 Yes, this code of Google's is just a refactoring of the code in the original. It is plainly obvious.

        That said, the original code is under a GPL license... who would think that above copying if the intent was another open source project?
        Mac_PC_FenceSitter
      • RE: Oracle says Google directly copied Java code: Here's the line-by-line comparison

        Sun actually open sourced Java years ago, so yes they can change the code for their own use. As long as they give it back to the community.
        raimu koyo asu
    • "Community source", not open source

      Their "Community Source" license does not grant the right to distribute a modified version of the code.
      ptcruisergt
      • RE: Oracle says Google directly copied Java code: Here's the line-by-line comparison

        @ptcruisergt

        Sun actually open sourced Java years ago, so yes they can change the code for their own use. As long as they give it back to the community.
        jakenhauser23
      • No...

        @ptcruisergt OpenJDK is GPL...
        snoop0x7b
      • RE: Oracle says Google directly copied Java code: Here's the line-by-line comparison

        @ptcruisergt

        Which is a 100% contradiction to the GPL v2, which the code was simultaneously licensed under...so which one counts?
        satorisingularity
    • RE: Oracle says Google directly copied Java code: Here's the line-by-line comparison

      @eddyrox1@... Suns license says that you can basically use Java anyway you want as long as:

      1. It meets the Java standard set by Sun.

      2. That you use the Sun Java Run Time.

      Google meets nether of those standards.

      Google will say that hey we are not actually using Java, that they are just allowing people to write in Java and then convert it to run in Dalvik. But with this evidence it looks as if Google is using more Java then they let on.
      tymiles
      • RE: Oracle says Google directly copied Java code: Here's the line-by-line comparison

        @tymiles Exactly - the whole point of Oracle's argument. It's not adhering to the specification of the platform, you aren't allowed to do use Java as a springboard to creating an incompatible new platform. This is EXACTLY what Microsoft tried to do with Visual J++ back in the day. Nobody thinks Sun was about to allow that do they?

        At least Microsoft's implementation allowed Sun's Java implementation to run, it defined incompatible extensions (a deliberate ploy to fracture Java in those early days).

        Google's implementation utterly incompatible, Oracle's (formally Sun's) implementation of Java doesn't run, and code produced for Dalvik doesn't run on a bona fide JRE. Why anyone is surprised Oracle have taken exception I cannot understand. Sun took Microsoft to court to protect Java. Oracle have to take Google to court to protect Java now.

        It seems so simple.
        Jeremy-UK