Clone Detection & Documentation
Right-click on a project to invoke CloneTracker (Click
here for explanation of search parameters). Clone detection is
memory intensive. We recommend a minimum of 748MB maximum VM memory parameter. More memory may be
required for larger code bases. Ideally, your machine should have greater than 1GB of RAM to ensure successful
detection of clones.
The clone groups identifed in the project are displayed under the "Clone Detector" node once
clone detection is completed.
1. The CloneTracker view has two top level nodes:
CloneDetector (displays the clone groups for a given project
after a successful clone detection)
and
CloneDocumentation (contains the documented clone groups - with yellow nodes).
2. To document a clone group, you can either right-click on the group and select "Document Clone Group" or drag the group
node from its project node in the CloneDetector node the and
drop
it on the CloneDocumentation node.
3. Modifications may change clone relationships. Update to the clone model is automatically triggered whenever modifications
are committed to the source code repository. The "DELTA" node shows the result of an update operation. In this example,
CloneTracker informs the developer that Group14 has been modified. One of its clone region(
m-) no longer
exist, and a new
clone region(
m+) has been added to the group. To update the clone model, delete the documented node, and drag-and-drop
the new node on the Clone Documentation node.
Change Notification
Change
notification in CloneTracker is integrated with the Eclipse
warning mechanism. The notification describes
the clone group to which
the modified region belongs
provides three QuickFix options.
The
Show Me option points the developer to the group
to which the clone
region belongs by highlighting the background
of the row in the Clone Documentation node to yellow, thus effectively eliminating
the need to repeat the clone detection and investigation
process.
The
Link/Unlink option provides support for consistently
modifying clone regions when necessary. When selected,
CloneTracker opens a
corresponding clone region, and modifications
made within common sub-regions of both clone regions
are echoed from the active clone region
to the sibling
clone region.
The
Ignore/Resolved option is used to inform CloneTracker
to ignore the clone region. Once selected, the plug-in removes
the marker from the clone region and from the Eclipse
Problems View for the duration of the Eclipse session. Modifications
to regions of this clone group during the current
session are not communicated to the developer.
CloneTracker can be easily installed through the Eclipse's update mechanism. CloneTracker is
distributed under the terms of the Eclipse Public License, v. 1.0
The features of the CloneTracker plug-in and the underlying algorithms and heuristics are described in
detail in our ICSE 2008 and ICSE 2007 papers respectively.
Publications
Ekwa Duala-Ekoko and Martin P. Robillard: CloneTracker: Tool Support for Code Clone Management. In Proceedings of the 30th ACM/IEEE International Conference
on Software Engineering, May 2008, Formal Research Demonstration. (pdf).
Ekwa Duala-Ekoko and Martin P. Robillard: Tracking Code Clones in Evolving Software. In Proceedings of the 29th ACM/IEEE International Conference
on Software Engineering, May 2007 [ACM SIGSOFT Distinguished Paper Award ]. (pdf).