if (!(object instanceof EPackage)) { return false; }
if (!isAttachedObject(output)) { return false; }
Clone fragments detected by clone detection tool
File path: /emf-2.4.1/src/org/eclipse/emf/mapping/ecore2ecore/impl/Ecore2EcoreMappingRootImpl.java File path: /emf-2.4.1/src/org/eclipse/emf/mapping/impl/MappingRootImpl.java
Method name: boolean canCreateMapping(Collection, Collection, Mapping) Method name: boolean canCreateMapping(Collection, Collection, Mapping)
Number of AST nodes: 2 Number of AST nodes: 2
1
if (!(object instanceof EPackage))
1
if (!isAttachedObject(output))
2
        {
2
      
3
  
3
{
4
        return false;
4
        return false;
5
        }
5
      }
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.2
Clones locationClones are in different classes having the same super class
Number of node comparisons5
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements2
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)3690.8
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    6
    if (!(object instanceof EPackage))
    6
    if (!(object instanceof EPackage))
    8
    if (!isAttachedObject(output))
    Differences
    Expression1Expression2Difference
    (object instanceof EPackage)isAttachedObject(output)TYPE_COMPATIBLE_REPLACEMENT
    8
    if (!isAttachedObject(output))
    7
    return false;
    7
    return false;
    9
    return false;
    Preondition Violations
    Conditional return false;
    Conditional return false;
    9
    return false;
    Precondition Violations (2)
    Row Violation
    1Conditional return false;
    2Conditional return false;