if (adapter.isAdapterForType(type)) { return adapter; }
if (!nameToValueMap.containsKey(result)) { return result; }
Clone fragments detected by clone detection tool
File path: /emf-2.4.1/src/org/eclipse/emf/common/notify/impl/AdapterFactoryImpl.java File path: /emf-2.4.1/src/org/eclipse/emf/ecore/xmi/impl/ResourceEntityHandlerImpl.java
Method name: Adapter adapt(Notifier, Object) Method name: String generateEntityName(String)
Number of AST nodes: 2 Number of AST nodes: 2
1
if (adapter.isAdapterForType(type))
1
if (!nameToValueMap.containsKey(result))
2
      {
2
      {
3
        return adapter;
3
        return result;
4
      }
4
      }
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 comparisons5
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements1
    Number of unmapped statements in the first code fragment1
    Number of unmapped statements in the second code fragment1
    Time elapsed for statement mapping (ms)375.7
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    2
    if (adapter.isAdapterForType(type))
    2
    if (adapter.isAdapterForType(type))
    2
    if (!nameToValueMap.containsKey(result))
    Differences
    Expression1Expression2Difference
    adapter.isAdapterForType(type)!nameToValueMap.containsKey(result)TYPE_COMPATIBLE_REPLACEMENT
    2
    if (!nameToValueMap.containsKey(result))
                                      
    3
    return result;
    Preondition Violations
    Unmatched return result;
    3
    return result;
    3
    return adapter;
    3
    return adapter;
    Preondition Violations
    Unmatched return adapter;
                                        
    Precondition Violations (2)
    Row Violation
    1Unmatched return result;
    2Unmatched return adapter;