1672-1-2

if (DEBUG_DRAW_LINK_AREA) { g2.setPaint(Color.blue); g2.draw(linkArea); g2.setPaint(Color.yellow); g2.draw(new Ellipse2D.Double(linkArea.getX(), linkArea.getY(), linkArea.getWidth(), linkArea.getHeight())); }
if (DEBUG_DRAW_LINK_AREA) { g2.setPaint(Color.blue); g2.draw(linkAreaXX); g2.setPaint(Color.yellow); g2.draw(new Ellipse2D.Double(linkAreaXX.getX(), linkAreaXX.getY(), linkAreaXX.getWidth(), linkAreaXX.getHeight())); }

Clone fragments detected by clone detection tool
File path: /jfreechart-1.0.10/src/org/jfree/chart/plot/PiePlot.java |  | File path: /jfreechart-1.0.10/src/org/jfree/chart/plot/PiePlot3D.java
Method name: `void drawPie(Graphics2D, Rectangle2D, PlotRenderingInfo)` |  | Method name: `void draw(Graphics2D, Rectangle2D, Point2D, PlotState, PlotRenderingInfo)`
Number of AST nodes: 5 |  | Number of AST nodes: 5

1

    if (DEBUG_DRAW_LINK_AREA) {↵

1

    if (DEBUG_DRAW_LINK_AREA) {↵

2

                g2.setPaint(Color.blue);↵

2

                g2.setPaint(Color.blue);↵

3

                g2.draw(linkArea);↵

3

                g2.draw(linkAreaXX);↵

4

                g2.setPaint(Color.yellow);↵

4

                g2.setPaint(Color.yellow);↵

5

                g2.draw(new Ellipse2D.Double(linkArea.getX(), linkArea.getY(), ↵

5

                g2.draw(new Ellipse2D.Double(linkAreaXX.getX(), linkAreaXX.getY(), ↵

6

                        linkArea.getWidth(), linkArea.getHeight()));↵

6

                        linkAreaXX.getWidth(), linkAreaXX.getHeight()));↵

7

            }

7

            }

See real code fragment |  | See real code fragment

Summary
Number of common nesting structure subtrees | 1
Number of refactorable cases | 1
Number of non-refactorable cases | 0
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.1
Clones location | Clones are in different classes having the same super class
Number of node comparisons | 25

1. {Refactorable}

   Mapping Summary
   Number of mapped statements | 5
   Number of unmapped statements in the first code fragment | 0
   Number of unmapped statements in the second code fragment | 0
   Time elapsed for statement mapping (ms) | 3.2
   Clone type | Type 2

   Mapped Statements
   ID | Statement |  | ID | Statement
   --- | --- | --- | --- | ---

   28

       if (DEBUG_DRAW_LINK_AREA)

   38

       if (DEBUG_DRAW_LINK_AREA)

   29

       g2.setPaint(Color.blue);

   39

       g2.setPaint(Color.blue);

   30

       g2.draw(linkArea);

   30 | g2.draw(linkArea);
   40 | g2.draw(linkAreaXX);

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   linkArea | linkAreaXX | VARIABLE_NAME_MISMATCH

   40

       g2.draw(linkAreaXX);

   31

       g2.setPaint(Color.yellow);

   41

       g2.setPaint(Color.yellow);

   32

       g2.draw(new Ellipse2D.Double(linkArea.getX(), linkArea.getY(), linkArea.getWidth(), linkArea.getHeight()));

   32 | g2.draw(new Ellipse2D.Double(linkArea.getX(), linkArea.getY(), linkArea.getWidth(), linkArea.getHeight()));
   42 | g2.draw(new Ellipse2D.Double(linkAreaXX.getX(), linkAreaXX.getY(), linkAreaXX.getWidth(), linkAreaXX.getHeight()));

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   linkArea | linkAreaXX | VARIABLE_NAME_MISMATCH
   linkArea | linkAreaXX | VARIABLE_NAME_MISMATCH
   linkArea | linkAreaXX | VARIABLE_NAME_MISMATCH
   linkArea | linkAreaXX | VARIABLE_NAME_MISMATCH

   42

       g2.draw(new Ellipse2D.Double(linkAreaXX.getX(), linkAreaXX.getY(), linkAreaXX.getWidth(), linkAreaXX.getHeight()));

   Precondition Violations (0)
   Row | Violation
   --- | ---