Actually they ducked this wider decision (for several pragmatic reasons) and decided on a narrow decision to only settle this case. The decision as I understand it was that even if APIs could be copyrighted then Google's use was fair use under copyright law and was so permissible.
Just need to rename or refactoring the functions, insert some random code in between, jumble up the sequence a bit and add in some spaghetti will make the lines not look duplicated.
It's not the same API if you do that. The whole point is compatibility between implementations which means same function names, same parameter lists, same return types.