|Source code comparison tools firstname.lastname@example.org (John R Levine) (2005-01-19)|
|Re: Source code comparison tools email@example.com (Derek M Jones) (2005-01-22)|
|Re: Source code comparison tools firstname.lastname@example.org (David Spencer) (2005-01-22)|
|Re: Source code comparison tools email@example.com (Ira Baxter) (2005-01-22)|
|Re: Source code comparison tools debray@CS.Arizona.EDU (2005-01-22)|
|From:||"Ira Baxter" <firstname.lastname@example.org>|
|Date:||22 Jan 2005 18:29:40 -0500|
|Posted-Date:||22 Jan 2005 18:29:40 EST|
"John R Levine" <email@example.com> wrote in message
> I'm working on a project where I'm trying to understand how a program
> evolved. I have a bunch of snapshots of the C source code to work from.
> It's easy enough to use the Unix diff program to compare the snapshots,
> but it's much too low level. If someone changes the name of variable A to
> B, diff sees that as a change every time the variable is referenced, but
> it's really only one change.
> I can hack up some preprocessing scripts to abstract out variable names,
> indentation, and the like before handing the files to diff, but before I
> do so, I'd like to see if there's existing tools I can use.
Hmm. Our CloneDR tool finds exact and near-miss duplicate code across
programs. Clearly it would find (a lot!) of duplicate code across
evolutionary versions. The duplicates it finds are effectively macro
bodies; the parameters is proposes take into account replication of
instances. In effect, this means if somebody renames variables
consistently in a block of code, the detected duplicate will have one
parameter for each changed variable name, e.g, exactly your "only one
There's a sample Java clone detector you can download there.
Ira D. Baxter, Ph.D., CTO 512-250-1018
Semantic Designs, Inc. www.semdesigns.com
Return to the
Search the comp.compilers archives again.