> If you read free code yourself it’s fine, but if a machine does it for you it’s not? We overvalue humans.
No, it's not fine. Apparently, you missed SCO & Oracle vs. Google cases. Both of these cases argued that somebody looked to the code, and copied it. In SCO case it was not true, but the argument stretched the timeline rather successfully. In Oracle vs. Google, copying function signatures opened a big can of worms.
So, just by copying the function signature without filling it the very same code with the original, even for interoperability, you're getting into a huge gray area in a legal sense.
Similarly, no sane Wine developer will read leaked Microsoft source code, yet alone copy it. Again, no sane emulator developer will read leaked Nintendo code.
Reading the code "colors" your creativity, and if you're tried at court and enough similarity is found in your code with the leaked code, it's game over.
So, reading code and copying is not guaranteed to be legal, depending on its license. When this is done by a robot, it's still illegal (you're breaching licenses during the code generation process), and immoral and unethical on top of it.
So, we don't overvalue humans, but overvalue AI, which is just informed search, BTW.