This is exactly where it gets murky. We had the usual 1-4 line snippets. We went the extra mile to change them, rewriting them from scratch, partially with different implementations. Did we need to do that? Would it have been enough to just change a variable name or some spacing or similar? I don't think there's a clear standard.
The music industry has struggled with this for a long time. When is a song derivative, when a copy, when is it "inspired by"...