if (object == null) { return false; } if (object == this) { return true; } if (super.equals(object) && object instanceof MiddlePinNeedle) { return true; } return false;
if (object == null) { return false; } if (object == this) { return true; } if (super.equals(object) && object instanceof WindNeedle) { return true; } return false;
Clone fragments detected by clone detection tool
File path: /jfreechart-1.0.10/src/org/jfree/chart/needle/MiddlePinNeedle.java File path: /jfreechart-1.0.10/src/org/jfree/chart/needle/WindNeedle.java
Method name: boolean equals(Object) Method name: boolean equals(Object)
Number of AST nodes: 7 Number of AST nodes: 7
1
if (object == null) {
1
if (object == null) {
2
            return false;
2
            return false;
3
        }
3
        }
4
        if (object == this) {
4
        if (object == this) {
5
            return true;
5
            return true;
6
        }
6
        }
7
        if (super.equals(object) && object instanceof MiddlePinNeedle) {
7
        if (super.equals(object) && object instanceof WindNeedle) {
8
            return true;
8
            return true;
9
        }
9
        }
10
        return false;
10
        return false;
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 comparisons22
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements7
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)0.9
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    if (object == null)
    1
    if (object == null)
    2
    return false;
    2
    return false;
    3
    if (object == this)
    3
    if (object == this)
    4
    return true;
    4
    return true;
    5
    if (super.equals(object) && object instanceof MiddlePinNeedle)
    5
    if (super.equals(object) && object instanceof MiddlePinNeedle)
    5
    if (super.equals(object) && object instanceof WindNeedle)
    Differences
    Expression1Expression2Difference
    org.jfree.chart.needle.MiddlePinNeedleorg.jfree.chart.needle.WindNeedleSUBCLASS_TYPE_MISMATCH
    Preondition Violations
    Super method call if(super.equals(object) && object instanceof MiddlePinNeedle) cannot be extracted from method
    Super method call if(super.equals(object) && object instanceof WindNeedle) cannot be extracted from method
    5
    if (super.equals(object) && object instanceof WindNeedle)
    6
    return true;
    6
    return true;
    7
    return false;
    7
    return false;
    Precondition Violations (2)
    Row Violation
    1Super method call if(super.equals(object) && object instanceof MiddlePinNeedle) cannot be extracted from method
    2Super method call if(super.equals(object) && object instanceof WindNeedle) cannot be extracted from method