in reply to Analyzing a Perl application

This is, un-fortunately, one of those cases where “TMTOWTDI” can turn-around and bite you in the (!).   There are many syntactically-different ways to express the same meaning in terms of source-code, and when you say, “are very similar,” you unfortunately (probably) mean, “means, or does, the same thing.”   And that kind of analysis ... which BTW I have done many, many times ... requires “the human eye.”

I happen to have more-than-trivial knowledge of the arcane arts of “source code analysis,” having worked for an early-90’s startup that tried (in vain...) to do this sort of thing with COBOL.   (They went public anyway, then of course went bust.)   You can map out data-dependencies and control flows (as I have myself done recently, in another Meditation), but you cannot discern meaning.

Certainly, you can automatically scan source-code to build up a data-dictionary and a code-dictionary ... and this, for an app that might involve many hundreds or even thousands of source-components, can certainly be useful.   These undertakings very quickly outstrip the limits of human visualization, even for the most spectacular of totally self-absorbed nerds.

Replies are listed 'Best First'.
Re^2: Analyzing a Perl application
by szabgab (Priest) on Feb 01, 2011 at 06:56 UTC
    Finding code snippets that mean the same even though written differently would be of course super awesome but for now I would be happy to locate instances of "copy-paste development".