I check Open Source Compliance for commercial code.
I have recently found a few examples where the commercial source is matched against quite a few OSS projects. The matches are very similar, but not exact, say about 30 lines of code with about 4 methods, a few variables names differ, some extra lines in the commercial code, ... but substantially the same. I don't think this is auto-generated code, nor copy-pasta, because things like comments will differ.
Rather it just looks like boilerplate - the developers say that Grails (and these examples always seem to come up in Grails, but it could be any framework) requires a specific script format for CRUD operations (and these examples are also predominantly CRUD operations). If one adds in a standard source-code style, then it amounts to boilerplate - even if it is original it's going to end up as very similar looking across a number of codebases.
Which leaves me with 2 questions:
- Is this a reasonable defence against accusations of copyright infringement?
- How would one form a judgement that codeX is such boilerplate, but codeY is not (as a non-expert in the language+framework)?