-
Notifications
You must be signed in to change notification settings - Fork 1
Clone Detection
There are two tools which might be of interest.
The first one implements the algorithm described in Baxter09 and is called CloneDR. It is a commercial product distributed by Semantic Designs.
The tool offers a really nice output which can be seen in this ExampleCloneSet. The output includes an "abstract" version with the clones replaced by Identifiers like [ [ #variable1234 ] ]. (The correct format does not include spaces, which are added to not be confused with wiki syntax)
/** @inheritDoc */
goog.dom.browserrange.W3cRange.prototype.[ [ #variable565d4e00 ] ] = function () {
return this.range_. [ [ #variable565d4c20 ] ];
} ;
In Baxter09 the authors also describe an automatic refactoring to the C preprocessor language, abstracting over detected clones.
The second clone detection tool is part of the "Bauhaus Stuttgart" tool suite Bauhaus. The authors of the tool claim to use a similar algorithm as CloneDR. The Bauhaus tool suite is only available for C, C++, Java and some other languages (not including JavaScript).
I did try to contact Semantic Designs for an evaluation copy of CloneDR. I haven't received a response, yet.