This sort of thing is a little scary. We can't know for certain whether he wrote the same code the same way twice, or if he copied and pasted it, but I can certainly imagine doing the former.
Q. The rangecheck function: Did you copy the Sun code while working on Android?
A. I did that while working on Timsort, and it was during the period I was employed at Google, but not for Google. It was something I wrote on my own for OpenJDK.
[I had not heard of Timsort before; it's (apparently) a very efficient sort written by Tim Peters for Python (see Wikipedia), and ported by Bloch to Java.]
[Timsort will come up again later. I'm somewhat appalled by how much fuss is being made over the trivial "rangecheck" function.]
Q. Why did you copy the rangecheck function for Timsort?
A. It's good engineering to reuse the same function if possible [The context here was that he expected to fold Timsort into a public version of Java, and at that point it would make sense to call the existing rangecheck function from the new code rather than writing a different one.]