if (obj == this) { return true; } if (!(obj instanceof OHLCSeriesCollection)) { return false; } OHLCSeriesCollection that = (OHLCSeriesCollection) obj; return ObjectUtilities.equal(this.data, that.data);
if (obj == this) { return true; } if (!(obj instanceof YIntervalSeriesCollection)) { return false; } YIntervalSeriesCollection that = (YIntervalSeriesCollection) obj; return ObjectUtilities.equal(this.data, that.data);
Clone fragments detected by clone detection tool
File path: /jfreechart-1.0.10/src/org/jfree/data/time/ohlc/OHLCSeriesCollection.java File path: /jfreechart-1.0.10/src/org/jfree/data/xy/YIntervalSeriesCollection.java
Method name: boolean equals(Object) Method name: boolean equals(Object)
Number of AST nodes: 6 Number of AST nodes: 6
1
if (obj == this) {
1
if (obj == this) {
2
            return true;
2
            return true;
3
        }
3
        }
4
        if (!(obj instanceof OHLCSeriesCollection)) {
4
        if (!(obj instanceof YIntervalSeriesCollection)) {
5
            return false;
5
            return false;
6
        }
6
        }
7
        OHLCSeriesCollection that = (OHLCSeriesCollection) obj;
7
        YIntervalSeriesCollection that = (YIntervalSeriesCollection) obj;
8
        return ObjectUtilities.equal(this.data, that.data);
8
        return ObjectUtilities.equal(this.data, that.data);
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.7
Clones locationClones are in different classes having the same super class
Number of node comparisons14
  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)4.9
    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 OHLCSeriesCollection))
    3
    if (!(obj instanceof OHLCSeriesCollection))
    3
    if (!(obj instanceof YIntervalSeriesCollection))
    Differences
    Expression1Expression2Difference
    org.jfree.data.time.ohlc.OHLCSeriesCollectionorg.jfree.data.xy.YIntervalSeriesCollectionSUBCLASS_TYPE_MISMATCH
    3
    if (!(obj instanceof YIntervalSeriesCollection))
    4
    return false;
    4
    return false;
    5
    OHLCSeriesCollection that = (OHLCSeriesCollection)obj;
    5
    OHLCSeriesCollection that = (OHLCSeriesCollection)obj;
    5
    YIntervalSeriesCollection that = (YIntervalSeriesCollection)obj;
    Differences
    Expression1Expression2Difference
    org.jfree.data.time.ohlc.OHLCSeriesCollectionorg.jfree.data.xy.YIntervalSeriesCollectionSUBCLASS_TYPE_MISMATCH
    org.jfree.data.time.ohlc.OHLCSeriesCollectionorg.jfree.data.xy.YIntervalSeriesCollectionSUBCLASS_TYPE_MISMATCH
    org.jfree.data.time.ohlc.OHLCSeriesCollectionorg.jfree.data.xy.YIntervalSeriesCollectionSUBCLASS_TYPE_MISMATCH
    5
    YIntervalSeriesCollection that = (YIntervalSeriesCollection)obj;
    6
    return ObjectUtilities.equal(this.data, that.data);
    6
    return ObjectUtilities.equal(this.data, that.data);
    6
    return ObjectUtilities.equal(this.data, that.data);
    Differences
    Expression1Expression2Difference
    org.jfree.data.time.ohlc.OHLCSeriesCollectionorg.jfree.data.xy.YIntervalSeriesCollectionSUBCLASS_TYPE_MISMATCH
    Preondition Violations
    Expression that.data cannot be unified with expression that.data , because common superclass org.jfree.data.xy.AbstractXYDataset does not declare member(s) private List#RAW data
    6
    return ObjectUtilities.equal(this.data, that.data);
    Precondition Violations (1)
    Row Violation
    1Expression that.data cannot be unified with expression that.data , because common superclass org.jfree.data.xy.AbstractXYDataset does not declare member(s) private List#RAW data