while (iterator.hasNext()) { Axis axis = (Axis) iterator.next(); if (axis != null) { AxisState axisState = axis.draw(g2, cursor, plotArea, dataArea, RectangleEdge.BOTTOM, plotState); cursor = axisState.getCursor(); axisStateMap.put(axis, axisState); } }
while (iterator.hasNext()) { Axis axis = (Axis) iterator.next(); if (axis != null) { AxisState axisState = axis.draw(g2, cursor, plotArea, dataArea, RectangleEdge.LEFT, plotState); cursor = axisState.getCursor(); axisStateMap.put(axis, axisState); } }
Clone fragments detected by clone detection tool
File path: /jfreechart-1.0.10/src/org/jfree/chart/plot/CategoryPlot.java File path: /jfreechart-1.0.10/src/org/jfree/chart/plot/CategoryPlot.java
Method name: Map drawAxes(Graphics2D, Rectangle2D, Rectangle2D, PlotRenderingInfo) Method name: Map drawAxes(Graphics2D, Rectangle2D, Rectangle2D, PlotRenderingInfo)
Number of AST nodes: 6 Number of AST nodes: 6
1
while (iterator.hasNext()) {
1
while (iterator.hasNext()) {
2
            Axis axis = (Axis) iterator.next();
2
            Axis axis = (Axis) iterator.next();
3
            if (axis != null) {
3
            if (axis != null) {
4
                AxisState axisState = axis.draw(g2, cursor, plotArea, dataArea,
4
                AxisState axisState = axis.draw(g2, cursor, plotArea, dataArea,
5
                        RectangleEdge.BOTTOM, plotState);
5
                        RectangleEdge.LEFT, plotState);
6
                cursor = axisState.getCursor();
6
                cursor = axisState.getCursor();
7
                axisStateMap.put(axis, axisState);
7
                axisStateMap.put(axis, axisState);
8
            }
8
            }
9
        }
9
        }
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.2
Clones locationClones are in the same method
Number of node comparisons25
  1. {Refactorable}
    Mapping Summary
    Number of mapped statements6
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)55.3
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    21
    while (iterator.hasNext())
    29
    while (iterator.hasNext())
    22
    Axis axis = (Axis)iterator.next();
    30
    Axis axis = (Axis)iterator.next();
    23
    if (axis != null)
    31
    if (axis != null)
    24
    AxisState axisState = axis.draw(g2, cursor, plotArea, dataArea, RectangleEdge.BOTTOM, plotState);
    24
    AxisState axisState = axis.draw(g2, cursor, plotArea, dataArea, RectangleEdge.BOTTOM, plotState);
    32
    AxisState axisState = axis.draw(g2, cursor, plotArea, dataArea, RectangleEdge.LEFT, plotState);
    Differences
    Expression1Expression2Difference
    BOTTOMLEFTVARIABLE_NAME_MISMATCH
    32
    AxisState axisState = axis.draw(g2, cursor, plotArea, dataArea, RectangleEdge.LEFT, plotState);
    25
    cursor = axisState.getCursor();
    33
    cursor = axisState.getCursor();
    26
    axisStateMap.put(axis, axisState);
    34
    axisStateMap.put(axis, axisState);
    Precondition Violations (0)
    Row Violation