Iterator l_itr = getSubplots().iterator(); while (l_itr.hasNext()) { CategoryPlot l_subplot = (CategoryPlot) l_itr.next(); l_subplot.setRangeAxis(0, axis, false); } super.setRangeAxis(axis); if (null == axis) { return; } axis.configure();
Iterator l_itr = getSubplots().iterator(); while (l_itr.hasNext()) { XYPlot l_subplot = (XYPlot) l_itr.next(); l_subplot.setRangeAxis(0, axis, false); } super.setRangeAxis(axis); if (null == axis) { return; } axis.configure();
Clone fragments detected by clone detection tool
File path: /jfreechart-1.0.10/experimental/org/jfree/experimental/chart/plot/CombinedCategoryPlot.java File path: /jfreechart-1.0.10/experimental/org/jfree/experimental/chart/plot/CombinedXYPlot.java
Method name: void setRangeAxis(ValueAxis) Method name: void setRangeAxis(ValueAxis)
Number of AST nodes: 8 Number of AST nodes: 8
1
Iterator l_itr = getSubplots().iterator();
1
Iterator l_itr = getSubplots().iterator();
2
        while (l_itr.hasNext()) {
2
        while (l_itr.hasNext()) {
3
            CategoryPlot l_subplot = (CategoryPlot) l_itr.next();
3
            XYPlot l_subplot = (XYPlot) l_itr.next();
4
            l_subplot.setRangeAxis(0, axis, false);
4
            l_subplot.setRangeAxis(0, axis, false);
5
        }
5
        }
6
        super.setRangeAxis(axis);
6
        super.setRangeAxis(axis);
7
        if (null == axis) {
7
        if (null == axis) {
8
            return;
8
            return;
9
        }
9
        }
10
        axis.configure();
10
        axis.configure();
Summary
Number of common nesting structure subtrees1
Number of refactorable cases0
Number of non-refactorable cases1
Time elapsed for finding largest common nesting structure subtrees (ms)0.3
Clones locationClones are in different classes having the same super class
Number of node comparisons24
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements8
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)72.8
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    Iterator l_itr = getSubplots().iterator();
    1
    Iterator l_itr = getSubplots().iterator();
    2
    while (l_itr.hasNext())
    2
    while (l_itr.hasNext())
    3
    CategoryPlot l_subplot = (CategoryPlot)l_itr.next();
    3
    CategoryPlot l_subplot = (CategoryPlot)l_itr.next();
    3
    XYPlot l_subplot = (XYPlot)l_itr.next();
    Differences
    Expression1Expression2Difference
    org.jfree.chart.plot.CategoryPlotorg.jfree.chart.plot.XYPlotSUBCLASS_TYPE_MISMATCH
    org.jfree.chart.plot.CategoryPlotorg.jfree.chart.plot.XYPlotSUBCLASS_TYPE_MISMATCH
    org.jfree.chart.plot.CategoryPlotorg.jfree.chart.plot.XYPlotSUBCLASS_TYPE_MISMATCH
    Preondition Violations
    Expression (CategoryPlot)l_itr.next() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression (XYPlot)l_itr.next() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    3
    XYPlot l_subplot = (XYPlot)l_itr.next();
    4
    l_subplot.setRangeAxis(0, axis, false);
    4
    l_subplot.setRangeAxis(0, axis, false);
    4
    l_subplot.setRangeAxis(0, axis, false);
    Differences
    Expression1Expression2Difference
    org.jfree.chart.plot.CategoryPlotorg.jfree.chart.plot.XYPlotSUBCLASS_TYPE_MISMATCH
    Preondition Violations
    Expression l_subplot cannot be unified with expression l_subplot , because common superclass org.jfree.chart.plot.Plot does not declare member(s) public void setRangeAxis(int, org.jfree.chart.axis.ValueAxis, boolean)
    4
    l_subplot.setRangeAxis(0, axis, false);
    5
    super.setRangeAxis(axis);
    5
    super.setRangeAxis(axis);
    5
    super.setRangeAxis(axis);
    Preondition Violations
    Super method call super.setRangeAxis(axis); cannot be extracted from method
    Super method call super.setRangeAxis(axis); cannot be extracted from method
    5
    super.setRangeAxis(axis);
    6
    if (null == axis)
    6
    if (null == axis)
    7
    return;
    7
    return;
    8
    axis.configure();
    8
    axis.configure();
    Precondition Violations (5)
    Row Violation
    1Expression (CategoryPlot)l_itr.next() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    2Expression (XYPlot)l_itr.next() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    3Expression l_subplot cannot be unified with expression l_subplot , because common superclass org.jfree.chart.plot.Plot does not declare member(s) public void setRangeAxis(int, org.jfree.chart.axis.ValueAxis, boolean)
    4Super method call super.setRangeAxis(axis); cannot be extracted from method
    5Super method call super.setRangeAxis(axis); cannot be extracted from method