ClonePacker: A Tool for Clone Set Visualization

What is ClonePacker?

ClonePacker is a tool for clone set visualization.
It uses Circle Packing for the visualization.
Circle Packing is one of enclosure diagrams, and it enables programmers to understand a file-hierarchical clone result.

Download / Installation

Please download ClonePacker.jar and put it into dropins folder of your Eclipse installation.
After a restart of your Eclipse, ClonePacker will be available.
You can uninstall ClonePacker by shutting down Eclipse and deleting the jar file from the dropins folder.

How to use ClonePacker

  1. Selecting a target method and running the clone detection
  2. Users select a target method by setting a caret position on the method.
    In the following figure, the caret position exists at 116th line.
    In this case, method draw (111th - 129th lines) is selected as the target method.
    After the users push the button enclosed in the red square, ClonePacker finds code clones of the target method.
    (In this introduction, we use JHotDraw 6.0 beta 1 for an example)


  3. Viewing the detection results
  4. After ClonePacker finishes detecting clones, the users can see the detection results.
    The right view shows the detected clones with Circle Packing.
    The yellow circle represents the target method that the users selected.
    The red one is Type-1 clone, the blue one is Type-2 clone and the green one is Type-3 clone.
    In this case, four Type-1 clones, three Type-2 clones and one Type-3 clone were detected.
    One of Type-1 clones located in the same directory with the target method, and the others located in different directories.
    The size of each circle represents LOC of each method.


  5. Viewing the detail results
  6. By clicking each circle, the location of the clone is shown in the bottom table.
    The location of the clone is represented as combination of its file path, its method name, its start line and its end line.
    The users can also see the source code of the detected clones at the bottom view.


Screenshots




Contact

Hiroaki Murakami <h-murakm at ist.osaka-u.ac.jp> (please replace "at" with "@")
Software Design Laboratory
Graduate School of Information Science and Technology, Osaka University