r/Android • • Jan 21 '11

Oops: Android contains directly copied Java code, strengthening Oracle's case -- Engadget

http://www.engadget.com/2011/01/21/oops-android-contains-directly-copied-java-code-strengthening/
0 Upvotes

74 comments sorted by

View all comments

11

u/[deleted] Jan 21 '11

Having looked at the example code, it isn't obvious how a lot of it could be written differently, the requirements of the methods are fairly well-defined.

If google had copied something with more than one possible implementation, like a sort algorithm, that would be much more convincing. Suprise suprise, such code is very, very different.

6

u/Tobiaswk Developer - Kotori your friend! Jan 21 '11

When you're looking at the exact same variable names, structure and composition of the code it does seems odd that they match. It seems like a complete copy/paste. At least some parts of the code-structure would be different. I see your point, but as it is now, this looks like a complete ripoff.

4

u/LongUsername Jan 21 '11

In the copy of the exibit I saw (hosted by androidpolice) the top straight away says that Oracle edited the files to make them look more similar. Granted, they claim it was only stripping comments and changing whitespace, but if one of those comments was "taken from standard document XXX" that would be important.....

3

u/mccoyn Jan 21 '11

The code is an implementation of a interface that is part of Java (I assume). The variable names are predefined. The function names are predefined. The exact effects of each function is predefined. You would have to work hard to write that code and not make it look like that. In some of the later examples, where local variables are defined, different names are used and different loop structures are used.

1

u/joe0185 Moto G Stylus 2024 Jan 21 '11

Unless they are formatting their code in some way I am unfamiliar with - I am going to have to agree with you. Obviously things like casing and naming conventions are something that you could duplicate very easily. But why are the constructor parameters in the exact same order, why are the methods in the exact same order, ect ect.

1

u/adrianmonk Jan 22 '11

Obviously things like casing and naming conventions are something that you could duplicate very easily.

Especially since there are specific coding conventions for Java laying out naming conventions and casing, indentation, and so on. There's even a description of which class members should come first (class variables before instance variables, constructors before methods, etc.).

These are not descriptions of the syntax; they are recommendations of which syntactically-valid things you should prefer and which syntactically-valid things you should not normally use.

3

u/[deleted] Jan 21 '11

This will certainly make for an interesting court case; I assume that Oracle will have to demonstrate that it is improbable that such code could be come up with so similar.

Note that this is just an exhibit designed to justify the general claim of copyright infringement; they can and probably will submit much, much more later.

0

u/davidb_ Jan 21 '11

I was thinking the same thing. How many different ways can you (reasonably) define toString().. but, I'm guessing there are more substantial claims than that method.