if (obj == this) { return true; } if (!(obj instanceof VectorSeriesCollection)) { return false; } VectorSeriesCollection that = (VectorSeriesCollection) obj; return ObjectUtilities.equal(this.data, that.data);
if (obj == this) { return true; } if (!(obj instanceof XYSeriesCollection)) { return false; } XYSeriesCollection that = (XYSeriesCollection) 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/xy/VectorSeriesCollection.java File path: /jfreechart-1.0.10/src/org/jfree/data/xy/XYSeriesCollection.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 VectorSeriesCollection)) {
4
        if (!(obj instanceof XYSeriesCollection)) {
5
            return false;
5
            return false;
6
        }
6
        }
7
        VectorSeriesCollection that = (VectorSeriesCollection) obj;
7
        XYSeriesCollection that = (XYSeriesCollection) 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.8
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)5.3
    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 VectorSeriesCollection))
    3
    if (!(obj instanceof VectorSeriesCollection))
    3
    if (!(obj instanceof XYSeriesCollection))
    Differences
    Expression1Expression2Difference
    org.jfree.data.xy.VectorSeriesCollectionorg.jfree.data.xy.XYSeriesCollectionSUBCLASS_TYPE_MISMATCH
    3
    if (!(obj instanceof XYSeriesCollection))
    4
    return false;
    4
    return false;
    5
    VectorSeriesCollection that = (VectorSeriesCollection)obj;
    5
    VectorSeriesCollection that = (VectorSeriesCollection)obj;
    5
    XYSeriesCollection that = (XYSeriesCollection)obj;
    Differences
    Expression1Expression2Difference
    org.jfree.data.xy.VectorSeriesCollectionorg.jfree.data.xy.XYSeriesCollectionSUBCLASS_TYPE_MISMATCH
    org.jfree.data.xy.VectorSeriesCollectionorg.jfree.data.xy.XYSeriesCollectionSUBCLASS_TYPE_MISMATCH
    org.jfree.data.xy.VectorSeriesCollectionorg.jfree.data.xy.XYSeriesCollectionSUBCLASS_TYPE_MISMATCH
    5
    XYSeriesCollection that = (XYSeriesCollection)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.xy.VectorSeriesCollectionorg.jfree.data.xy.XYSeriesCollectionSUBCLASS_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