Oracle already won a case that deemed APIs copyrightable. Which is bad for the industry at large. Except for Oracle and patent trolls off course. Google is now arguing whether it copied code in a fair way or not. They can't argue that they didn't copy anymore because they have already lost that case.
What is happening now is more like proving to your lecturer that you didn't copy your whole assignment from Wikipedia. You only extracted some information from it and majority are your own.