@passenger IIRC the whole Oracle vs Google shebang was about exactly that. But here, real lawyers like @neil and @babe are better placed to comment.