if (getLabel(name).equals(label)) { return name; }
if (!factory.isFactoryForType(type)) { continue FactoryLoop; }
Clone fragments detected by clone detection tool
File path: /emf-2.4.1/src/org/eclipse/emf/mapping/ecore2ecore/presentation/Ecore2EcoreModelWizard.java File path: /emf-2.4.1/src/org/eclipse/emf/edit/provider/ComposedAdapterFactory.java
Method name: String getInitialObjectName() Method name: AdapterFactory getFactoryForTypes(Collection)
Number of AST nodes: 2 Number of AST nodes: 2
1
if (getLabel(name).equals(label))
1
if (!factory.isFactoryForType(type))
2
        {
2
          {
3
          return name;
3
          
4
  continue FactoryLoop;
4
        }
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
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)84.6
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    3
    if (getLabel(name).equals(label))
    3
    if (getLabel(name).equals(label))
    11
    if (!factory.isFactoryForType(type))
    Differences
    Expression1Expression2Difference
    getLabel(name).equals(label)!factory.isFactoryForType(type)TYPE_COMPATIBLE_REPLACEMENT
    11
    if (!factory.isFactoryForType(type))
    4
    return name;
    4
    return name;
    Preondition Violations
    Unmatched return name;
                                  
                                                      
    12
    continue FactoryLoop;
    Preondition Violations
    Unmatched continue FactoryLoop;
    12
    continue FactoryLoop;
    Precondition Violations (2)
    Row Violation
    1Unmatched return name;
    2Unmatched continue FactoryLoop;