if (this == obj) { return true; } if (obj instanceof CategoryTick && super.equals(obj)) { CategoryTick that = (CategoryTick) obj; if (!ObjectUtilities.equal(this.category, that.category)) { return false; } if (!ObjectUtilities.equal(this.label, that.label)) { return false; } if (!ObjectUtilities.equal(this.labelAnchor, that.labelAnchor)) { return false; } return true; } return false;
if (obj == this) { return true; } if (!(obj instanceof StandardXYURLGenerator)) { return false; } StandardXYURLGenerator that = (StandardXYURLGenerator) obj; if (!ObjectUtilities.equal(that.prefix, this.prefix)) { return false; } if (!ObjectUtilities.equal(that.seriesParameterName, this.seriesParameterName)) { return false; } if (!ObjectUtilities.equal(that.itemParameterName, this.itemParameterName)) { return false; } return true;
Clone fragments detected by clone detection tool
File path: /jfreechart-1.0.10/src/org/jfree/chart/axis/CategoryTick.java File path: /jfreechart-1.0.10/src/org/jfree/chart/urls/StandardXYURLGenerator.java
Method name: boolean equals(Object) Method name: boolean equals(Object)
Number of AST nodes: 12 Number of AST nodes: 12
1
if (this == obj) {
1
if (obj == this) {
2
            return true;   
2
            return true;   
3
        }
3
        }
4
        if (obj instanceof CategoryTick && super.equals(obj)) {
4
        if (!(obj instanceof StandardXYURLGenerator)) {
5
            return false;
5
            CategoryTick that = (CategoryTick) obj;   
6
        
6
    
7
}
8
        StandardXYURLGenerator that = (StandardXYURLGenerator) obj;
7
        if (!ObjectUtilities.equal(this.category, that.category)) {
9
        if (!ObjectUtilities.equal(that.prefix, this.prefix)) {
8
                return false;   
10
            return false;
9
            }
11
        
10
    
12
}
11
        if (!ObjectUtilities.equal(this.label, that.label
13
        if (!ObjectUtilities.equal(that.seriesParameterName, 
12
)) {
14
                this.seriesParameterName)) {
13
                return false;   
15
            return false;
14
    
15
        }
16
        }
16
            if (!ObjectUtilities.equal(this.labelAnchor, that.labelAnchor)) {
17
        if (!ObjectUtilities.equal(that.itemParameterName, 
17
                return false;   
18
                
18
           }
19
this.itemParameterName)) {
19
            return true;
20
            return false;
20
        }
21
        }
21
        return false;
22
        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)1.7
Clones locationClones are in different classes
Number of node comparisons18
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements2
    Number of unmapped statements in the first code fragment1
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)0.7
    Clone typeType 3
    Mapped Statements
    ID Statement ID Statement
    4
    CategoryTick that = (CategoryTick)obj;
                                                                                  
    5
    if (!ObjectUtilities.equal(this.category, that.category))
    5
    if (!ObjectUtilities.equal(this.category, that.category))
    3
    if (!(obj instanceof StandardXYURLGenerator))
    Differences
    Expression1Expression2Difference
    ObjectUtilities.equal(this.category,that.category)(obj instanceof StandardXYURLGenerator)TYPE_COMPATIBLE_REPLACEMENT
    Preondition Violations
    Expression ObjectUtilities.equal(this.category,that.category) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    3
    if (!(obj instanceof StandardXYURLGenerator))
    6
    return false;
    4
    return false;
    Precondition Violations (2)
    Row Violation
    1Expression ObjectUtilities.equal(this.category,that.category) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    2Not all possible execution flows end in a return statement