while (iterator.hasNext()) { ValueAxis axis = (ValueAxis) iterator.next(); AxisState info = axis.draw(g2, cursor, plotArea, dataArea, RectangleEdge.BOTTOM, plotState); cursor = info.getCursor(); axisStateMap.put(axis, info); }
while (iterator.hasNext()) { 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: 5 Number of AST nodes: 5
1
while (iterator.hasNext()) {
1
while (iterator.hasNext()) {
2
            ValueAxis axis = (ValueAxis) iterator.next();
2
            ValueAxis axis = (ValueAxis) iterator.next();
3
            AxisState info = axis.draw(g2, cursor, plotArea, dataArea,
3
            AxisState info = axis.draw(g2, cursor, plotArea, dataArea,
4
                    RectangleEdge.BOTTOM, plotState);
4
                    RectangleEdge.RIGHT, plotState);
5
            cursor = info.getCursor();
5
            cursor = info.getCursor();
6
            axisStateMap.put(axis, info);
6
            axisStateMap.put(axis, info);
7
        }
7
        }
Summary
Number of common nesting structure subtrees1
Number of refactorable cases1
Number of non-refactorable cases0
Time elapsed for finding largest common nesting structure subtrees (ms)0.1
Clones locationClones are in the same method
Number of node comparisons32
  1. {Refactorable}
    Mapping Summary
    Number of mapped statements5
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)46.4
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    20
    while (iterator.hasNext())
    34
    while (iterator.hasNext())
    21
    ValueAxis axis = (ValueAxis)iterator.next();
    35
    ValueAxis axis = (ValueAxis)iterator.next();
    22
    AxisState info = axis.draw(g2, cursor, plotArea, dataArea, RectangleEdge.BOTTOM, plotState);
    22
    AxisState info = axis.draw(g2, cursor, plotArea, dataArea, RectangleEdge.BOTTOM, plotState);
    36
    AxisState info = axis.draw(g2, cursor, plotArea, dataArea, RectangleEdge.RIGHT, plotState);
    Differences
    Expression1Expression2Difference
    BOTTOMRIGHTVARIABLE_NAME_MISMATCH
    36
    AxisState info = axis.draw(g2, cursor, plotArea, dataArea, RectangleEdge.RIGHT, plotState);
    23
    cursor = info.getCursor();
    37
    cursor = info.getCursor();
    24
    axisStateMap.put(axis, info);
    38
    axisStateMap.put(axis, info);
    Precondition Violations (0)
    Row Violation