off: clone digger -- tool for searching code duplicates

John Arbash Meinel john at arbash-meinel.com
Wed Mar 12 14:43:07 GMT 2008


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Alexander Belchenko wrote:
| http://clonedigger.sourceforge.net -- when I first time looked at this
| thing
| I thought: could it be used for better diff/merge? But apparently short
| discussion
| with author reveals that it's far away from real goal of this project.
|

It does sound interesting. Mostly that it is an Abstract Syntax Tree differ
rather than a raw text diff.

So it looks at the layout of the program structure. It is only applicable to
languages in knows how to parse the AST for. (Python and Java apparently)

It also seems to be geared to a different purpose. Looking over your whole
source tree and seeing if you have duplicated code is a bit different than
comparing 2 versions of the same code.

I'm also curious about performance, as I'm guessing it is doing graph matching
on the AST.

The nice thing is that it might be immune to variable renames, as well as moving
blocks of code. The downside is that it might match more than you might expect
it to, and I'm not sure how you would define conflicts, etc, in user
understandable ways.

John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFH1+v6JdeBCYSNAAMRAuUdAKCKTyrQLnLGgqdcMF/riP+k22mkRgCdFEKC
m1SPi56bzJ9657EcvG65n0U=
=yJqz
-----END PGP SIGNATURE-----



More information about the bazaar mailing list