Just a bit of background:
Those lines of code are from OpenJDK's TimSort implementation. It was written by Joshua Bloch, who was actually working for Google at the time, and contributed to OpenJDK. He later re-used the same code for Android's implementation of this same function.
In order for this to be a copyright violation, Bloch would have had to assign exclusive ownership over the code to Oracle.
Quoting from the relevant section of the Oracle Contributor Agreement:
"You hereby assign to us joint ownership", and "grant to us a perpetual, irrevocable, non-exclusive, worldwide, no-charge, royalty-free, unrestricted license to exercise all rights under those copyrights". However, "each of us can do all things in relation to your contribution as if each of us were the sole owners".
So, Bloch still owns this the copyright in this code, and is free to do whatever he wants with it. All he did was grant Oracle the same rights to that code that he has, so that Oracle can do whatever they want with it as well.
So, not copyright infringement. Oracle's own contributor agreement makes that very clear.
Edit: Added references
List of signatories of the Oracle Contributor Agreement (Google cache, because the main site is down at the moment):
http://webcache.googleusercontent.com/search?q=cache:6zsMkHa...
http://sca.java.net/CA_signatories.htm
Oracle Contributor Agreement:
http://www.oracle.com/technetwork/oca-405177.pdf