if (object == this) { return true; } if (!(object instanceof List)) { return false; } List<?> list = (List<?>)object; if (list.size() != size) { return false; }
if (object == this) { return true; } if (!(object instanceof List)) { return false; } List<?> list = (List<?>)object; if (list.size() != delegateSize()) { return false; }
Clone fragments detected by clone detection tool
File path: /emf-2.4.1/src/org/eclipse/emf/common/util/BasicEList.java File path: /emf-2.4.1/src/org/eclipse/emf/ecore/impl/EStoreEObjectImpl.java
Method name: boolean equals(Object) Method name: boolean delegateEquals(Object)
Number of AST nodes: 7 Number of AST nodes: 7
1
if (object == this)
1
if (object == this)
2
    {
2
    
3
  {
3
      return true;
4
        return true;
4
    }
5
      }
5
    if (!(object instanceof List))
6
      if (!(object instanceof List))
6
    {
7
      {
7
      return false;
8
        return false;
8
    }
9
      }
9
    List<?> list = (List<?>)object;
10
      List<?> list = (List<?>)object;
10
    if (list.size() != size)
11
      if (list.size() != delegateSize())
11
    {
12
      {
12
      return false;
13
        return false;
13
    }
14
      }
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.6
Clones locationClones are in different classes having the same super class
Number of node comparisons18
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements4
    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.5
    Clone typeType 1
    Mapped Statements
    ID Statement ID Statement
    1
    if (object == this)
    1
    if (object == this)
    2
    return true;
    2
    return true;
    2
    return true;
    Preondition Violations
    Conditional return true;
    Conditional return true;
    2
    return true;
    3
    if (!(object instanceof List))
    3
    if (!(object instanceof List))
    4
    return false;
    4
    return false;
    4
    return false;
    Preondition Violations
    Conditional return false;
    Conditional return false;
    4
    return false;
    Precondition Violations (4)
    Row Violation
    1Conditional return true;
    2Conditional return true;
    3Conditional return false;
    4Conditional return false;