Range l_result = null; Iterator l_itr = getSubplots().iterator(); while (l_itr.hasNext()) { CategoryPlot l_subplot = (CategoryPlot) l_itr.next(); l_result = Range.combine(l_result, l_subplot.getDataRange(axis)); } return l_result;
Range l_result = null; Iterator l_itr = getSubplots().iterator(); while (l_itr.hasNext()) { XYPlot l_subplot = (XYPlot) l_itr.next(); l_result = Range.combine(l_result, l_subplot.getDataRange(axis)); } return l_result;
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: Range getDataRange(ValueAxis) Method name: Range getDataRange(ValueAxis)
Number of AST nodes: 6 Number of AST nodes: 6
1
Range l_result = null;
1
Range l_result = null;
2
        Iterator l_itr = getSubplots().iterator();
2
        Iterator l_itr = getSubplots().iterator();
3
        while (l_itr.hasNext()) {
3
        while (l_itr.hasNext()) {
4
            CategoryPlot l_subplot = (CategoryPlot) l_itr.next();
4
            XYPlot l_subplot = (XYPlot) l_itr.next();
5
            l_result = Range.combine(l_result, l_subplot.getDataRange(axis));
5
            l_result = Range.combine(l_result, l_subplot.getDataRange(axis));
6
        }
6
        }
7
        return l_result;
7
        return l_result;
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.1
Clones locationClones are in different classes having the same super class
Number of node comparisons18
  1. {Non-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)531.3
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    Range l_result = null;
    1
    Range l_result = null;
    2
    Iterator l_itr = getSubplots().iterator();
    2
    Iterator l_itr = getSubplots().iterator();
    3
    while (l_itr.hasNext())
    3
    while (l_itr.hasNext())
    4
    CategoryPlot l_subplot = (CategoryPlot)l_itr.next();
    4
    CategoryPlot l_subplot = (CategoryPlot)l_itr.next();
    4
    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
    4
    XYPlot l_subplot = (XYPlot)l_itr.next();
    5
    l_result = Range.combine(l_result, l_subplot.getDataRange(axis));
    5
    l_result = Range.combine(l_result, l_subplot.getDataRange(axis));
    5
    l_result = Range.combine(l_result, l_subplot.getDataRange(axis));
    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 org.jfree.data.Range getDataRange(org.jfree.chart.axis.ValueAxis)
    5
    l_result = Range.combine(l_result, l_subplot.getDataRange(axis));
    6
    return l_result;
    6
    return l_result;
    Precondition Violations (3)
    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 org.jfree.data.Range getDataRange(org.jfree.chart.axis.ValueAxis)