if (obj == this) { return true; } if (!(obj instanceof CombinedDomainCategoryPlot)) { return false; } if (!super.equals(obj)) { return false; } CombinedDomainCategoryPlot plot = (CombinedDomainCategoryPlot) obj; if (!ObjectUtilities.equal(this.subplots, plot.subplots)) { return false; } if (this.totalWeight != plot.totalWeight) { return false; } if (this.gap != plot.gap) { return false; } return true;
if (obj == this) { return true; } if (!(obj instanceof CombinedRangeCategoryPlot)) { return false; } if (!super.equals(obj)) { return false; } CombinedRangeCategoryPlot that = (CombinedRangeCategoryPlot) obj; if (!ObjectUtilities.equal(this.subplots, that.subplots)) { return false; } if (this.totalWeight != that.totalWeight) { return false; } if (this.gap != that.gap) { return false; } return true;
Clone fragments detected by clone detection tool
File path: /jfreechart-1.0.10/src/org/jfree/chart/plot/CombinedDomainCategoryPlot.java File path: /jfreechart-1.0.10/src/org/jfree/chart/plot/CombinedRangeCategoryPlot.java
Method name: boolean equals(Object) Method name: boolean equals(Object)
Number of AST nodes: 14 Number of AST nodes: 14
1
if (obj == this) {
1
if (obj == this) {
2
            return true;
2
            return true;
3
        }
3
        }
4
        if (!(obj instanceof CombinedDomainCategoryPlot)) {
4
        if (!(obj instanceof CombinedRangeCategoryPlot)) {
5
            return false;
5
            return false;
6
        }
6
        }
7
        if (!super.equals(obj)) {
7
        if (!super.equals(obj)) {
8
            return false;
8
            return false;
9
        }
9
        }
10
        CombinedDomainCategoryPlot plot = (CombinedDomainCategoryPlot) obj;
10
        CombinedRangeCategoryPlot that = (CombinedRangeCategoryPlot) obj;
11
        if (!ObjectUtilities.equal(this.subplots, plot.subplots)) {
11
        if (!ObjectUtilities.equal(this.subplots, that.subplots)) {
12
            return false;
12
            return false;
13
        }
13
        }
14
        if (this.totalWeight != plot.totalWeight) {
14
        if (this.totalWeight != that.totalWeight) {
15
            return false;
15
            return false;
16
        }
16
        }
17
        if (this.gap != plot.gap) {
17
        if (this.gap != that.gap) {
18
            return false;
18
            return false;
19
        }
19
        }
20
        return true;
20
        return true;
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)5.0
Clones locationClones are in different classes having the same super class
Number of node comparisons70
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements14
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)125.7
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    if (obj == this)
    1
    if (obj == this)
    2
    return true;
    2
    return true;
    3
    if (!(obj instanceof CombinedDomainCategoryPlot))
    3
    if (!(obj instanceof CombinedDomainCategoryPlot))
    3
    if (!(obj instanceof CombinedRangeCategoryPlot))
    Differences
    Expression1Expression2Difference
    org.jfree.chart.plot.CombinedDomainCategoryPlotorg.jfree.chart.plot.CombinedRangeCategoryPlotSUBCLASS_TYPE_MISMATCH
    3
    if (!(obj instanceof CombinedRangeCategoryPlot))
    4
    return false;
    4
    return false;
    5
    if (!super.equals(obj))
    5
    if (!super.equals(obj))
    5
    if (!super.equals(obj))
    Preondition Violations
    Super method call if(!super.equals(obj)) cannot be extracted from method
    Super method call if(!super.equals(obj)) cannot be extracted from method
    5
    if (!super.equals(obj))
    6
    return false;
    6
    return false;
    7
    CombinedDomainCategoryPlot plot = (CombinedDomainCategoryPlot)obj;
    7
    CombinedDomainCategoryPlot plot = (CombinedDomainCategoryPlot)obj;
    7
    CombinedRangeCategoryPlot that = (CombinedRangeCategoryPlot)obj;
    Differences
    Expression1Expression2Difference
    org.jfree.chart.plot.CombinedDomainCategoryPlotorg.jfree.chart.plot.CombinedRangeCategoryPlotSUBCLASS_TYPE_MISMATCH
    plotthatVARIABLE_NAME_MISMATCH
    org.jfree.chart.plot.CombinedDomainCategoryPlotorg.jfree.chart.plot.CombinedRangeCategoryPlotSUBCLASS_TYPE_MISMATCH
    org.jfree.chart.plot.CombinedDomainCategoryPlotorg.jfree.chart.plot.CombinedRangeCategoryPlotSUBCLASS_TYPE_MISMATCH
    7
    CombinedRangeCategoryPlot that = (CombinedRangeCategoryPlot)obj;
    8
    if (!ObjectUtilities.equal(this.subplots, plot.subplots))
    8
    if (!ObjectUtilities.equal(this.subplots, plot.subplots))
    8
    if (!ObjectUtilities.equal(this.subplots, that.subplots))
    Differences
    Expression1Expression2Difference
    plotthatVARIABLE_NAME_MISMATCH
    org.jfree.chart.plot.CombinedDomainCategoryPlotorg.jfree.chart.plot.CombinedRangeCategoryPlotSUBCLASS_TYPE_MISMATCH
    Preondition Violations
    Expression plot.subplots cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression that.subplots cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression plot.subplots cannot be unified with expression that.subplots , because common superclass org.jfree.chart.plot.CategoryPlot does not declare member(s) private List#RAW subplots
    8
    if (!ObjectUtilities.equal(this.subplots, that.subplots))
    9
    return false;
    9
    return false;
    10
    if (this.totalWeight != plot.totalWeight)
    10
    if (this.totalWeight != plot.totalWeight)
    10
    if (this.totalWeight != that.totalWeight)
    Differences
    Expression1Expression2Difference
    plotthatVARIABLE_NAME_MISMATCH
    org.jfree.chart.plot.CombinedDomainCategoryPlotorg.jfree.chart.plot.CombinedRangeCategoryPlotSUBCLASS_TYPE_MISMATCH
    Preondition Violations
    Expression plot.totalWeight cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression that.totalWeight cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression plot.totalWeight cannot be unified with expression that.totalWeight , because common superclass org.jfree.chart.plot.CategoryPlot does not declare member(s) private int totalWeight
    10
    if (this.totalWeight != that.totalWeight)
    11
    return false;
    11
    return false;
    12
    if (this.gap != plot.gap)
    12
    if (this.gap != plot.gap)
    12
    if (this.gap != that.gap)
    Differences
    Expression1Expression2Difference
    plotthatVARIABLE_NAME_MISMATCH
    org.jfree.chart.plot.CombinedDomainCategoryPlotorg.jfree.chart.plot.CombinedRangeCategoryPlotSUBCLASS_TYPE_MISMATCH
    Preondition Violations
    Expression plot.gap cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression that.gap cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression plot.gap cannot be unified with expression that.gap , because common superclass org.jfree.chart.plot.CategoryPlot does not declare member(s) private double gap
    12
    if (this.gap != that.gap)
    13
    return false;
    13
    return false;
    14
    return true;
    14
    return true;
    Precondition Violations (11)
    Row Violation
    1Super method call if(!super.equals(obj)) cannot be extracted from method
    2Super method call if(!super.equals(obj)) cannot be extracted from method
    3Expression plot.subplots cannot be parameterized, because it has dependencies to/from statements that will be extracted
    4Expression that.subplots cannot be parameterized, because it has dependencies to/from statements that will be extracted
    5Expression plot.subplots cannot be unified with expression that.subplots , because common superclass org.jfree.chart.plot.CategoryPlot does not declare member(s) private List#RAW subplots
    6Expression plot.totalWeight cannot be parameterized, because it has dependencies to/from statements that will be extracted
    7Expression that.totalWeight cannot be parameterized, because it has dependencies to/from statements that will be extracted
    8Expression plot.totalWeight cannot be unified with expression that.totalWeight , because common superclass org.jfree.chart.plot.CategoryPlot does not declare member(s) private int totalWeight
    9Expression plot.gap cannot be parameterized, because it has dependencies to/from statements that will be extracted
    10Expression that.gap cannot be parameterized, because it has dependencies to/from statements that will be extracted
    11Expression plot.gap cannot be unified with expression that.gap , because common superclass org.jfree.chart.plot.CategoryPlot does not declare member(s) private double gap