I am working at a medium-size semi-govermental organization managing subcontractors for software projects. One of our contractors recently turned in the "source code" for the project they had contracted. I strongly suspect that the code is auto-generated. This bothers me for several reasons (some of which are also mentioned in: Is source code generation an anti-pattern?). E.g.:
- I suspect that the code is a lot larger than it could have been, had it been written manually
- maintaining this code will accordingly be a lot harder
- since this is not really source code, there are no comments at all (or only token, useless comments) and no effort was apparently made to come up with a meaningful organization of the code base (e.g. in terms of libraries, etc) that would have made sense to a human maintainer
- the contractor is using this as a way to circumvent their obligation to surrender their source code to us and also with a view to securing future maintenance contracts as well (or at least enjoy an advantage over other bidders who won't have access to the real sources).
The contractor has also done a clever job of injecting some artificial randomness in the generated sources so as to give the impression that this was written by hand.
I feel that my employer / the taxpayer is being cheated by an unscrupulous subcontractor willing to walk on a fuzzy red line, betting that they've done something clever that can't be conclusively proved.
Is there a way I can detect and prove that this was automatically generated by some other software?