if (fileExtension.equals(extension)) { return true; }
if (entry.equals(object)) { remove(i); return true; }
Clone fragments detected by clone detection tool
File path: /emf-2.4.1/src/org/eclipse/emf/ecore/xmi/impl/RootXMLContentHandlerImpl.java File path: /emf-2.4.1/src/org/eclipse/emf/ecore/util/BasicFeatureMap.java
Method name: boolean canHandle(URI) Method name: boolean remove(EStructuralFeature, Object)
Number of AST nodes: 2 Number of AST nodes: 3
1
if (fileExtension.equals(extension))
1
if (
2
          {
2
entry.equals(object))
3
          {
4
            remove(i);
3
            return true;
5
            return true;
4
          }
6
          }
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.1
Clones locationClones are in different classes
Number of node comparisons7
  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 fragment1
    Time elapsed for statement mapping (ms)0.3
    Clone typeType 3
    Mapped Statements
    ID Statement ID Statement
    6
    if (fileExtension.equals(extension))
    6
    if (fileExtension.equals(extension))
    7
    if (entry.equals(object))
    Differences
    Expression1Expression2Difference
    extensionobjectVARIABLE_NAME_MISMATCH
    java.lang.Stringjava.lang.ObjectVARIABLE_TYPE_MISMATCH
    fileExtensionentryVARIABLE_NAME_MISMATCH
    java.lang.Stringorg.eclipse.emf.ecore.util.FeatureMap.EntryVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type java.lang.String of variable extension does not match with type java.lang.Object of variable object
    • Make classes java.lang.String and java.lang.Object extend a common superclass
    Type java.lang.String of variable fileExtension does not match with type org.eclipse.emf.ecore.util.FeatureMap.Entry of variable entry
    • Make classes java.lang.String and org.eclipse.emf.ecore.util.FeatureMap.Entry extend a common superclass
    7
    if (entry.equals(object))
                              
    8
    remove(i);
    7
    return true;
    7
    return true;
    9
    return true;
    Preondition Violations
    Conditional return true;
    Conditional return true;
    9
    return true;
    Precondition Violations (4)
    Row Violation
    1Type java.lang.String of variable extension does not match with type java.lang.Object of variable object
    2Type java.lang.String of variable fileExtension does not match with type org.eclipse.emf.ecore.util.FeatureMap.Entry of variable entry
    3Conditional return true;
    4Conditional return true;