1769-1-4

ValueAxis axis = (ValueAxis) iterator.next(); AxisState info = axis.draw(g2, cursor, plotArea, dataArea, RectangleEdge.TOP, plotState); cursor = info.getCursor(); axisStateMap.put(axis, info);
ValueAxis axis = (ValueAxis) iterator.next(); AxisState info = axis.draw(g2, cursor, plotArea, dataArea, RectangleEdge.RIGHT, plotState); cursor = info.getCursor(); axisStateMap.put(axis, info);

Clone fragments detected by clone detection tool
File path: /jfreechart-1.0.10/src/org/jfree/chart/plot/XYPlot.java |  | File path: /jfreechart-1.0.10/src/org/jfree/chart/plot/XYPlot.java
Method name: `Map drawAxes(Graphics2D, Rectangle2D, Rectangle2D, PlotRenderingInfo)` |  | Method name: `Map drawAxes(Graphics2D, Rectangle2D, Rectangle2D, PlotRenderingInfo)`
Number of AST nodes: 4 |  | Number of AST nodes: 4

1

    ValueAxis axis = (ValueAxis) iterator.next();↵

1

    ValueAxis axis = (ValueAxis) iterator.next();↵

2

                AxisState info = axis.draw(g2, cursor, plotArea, dataArea,↵

2

                AxisState info = axis.draw(g2, cursor, plotArea, dataArea,↵

3

                        RectangleEdge.TOP, plotState);↵

3

                        RectangleEdge.RIGHT, plotState);↵

4

                cursor = info.getCursor();↵

4

                cursor = info.getCursor();↵

5

                axisStateMap.put(axis, info);

5

                axisStateMap.put(axis, info);

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.0
Clones location | Clones are in the same method
Number of node comparisons | 20

1. {Refactorable}

   Mapping Summary
   Number of mapped statements | 4
   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) | 0.0
   Clone type | Type 2

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

   14

       ValueAxis axis = (ValueAxis)iterator.next();

   35

       ValueAxis axis = (ValueAxis)iterator.next();

   15

       AxisState info = axis.draw(g2, cursor, plotArea, dataArea, RectangleEdge.TOP, plotState);

   15 | AxisState info = axis.draw(g2, cursor, plotArea, dataArea, RectangleEdge.TOP, plotState);
   36 | AxisState info = axis.draw(g2, cursor, plotArea, dataArea, RectangleEdge.RIGHT, plotState);

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   TOP | RIGHT | VARIABLE_NAME_MISMATCH

   36

       AxisState info = axis.draw(g2, cursor, plotArea, dataArea, RectangleEdge.RIGHT, plotState);

   16

       cursor = info.getCursor();

   37

       cursor = info.getCursor();

   17

       axisStateMap.put(axis, info);

   38

       axisStateMap.put(axis, info);

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