if (mappings.contains(parent)) { continue LOOP; }
if (isValidValue(object, child, eReference)) { return eReference; }
Clone fragments detected by clone detection tool
File path: /emf-2.4.1/src/org/eclipse/emf/mapping/presentation/MappingEditor.java File path: /emf-2.4.1/src/org/eclipse/emf/edit/provider/ItemProviderAdapter.java
Method name: void run() Method name: EReference getChildReference(Object, Object)
Number of AST nodes: 2 Number of AST nodes: 2
1
if (mappings.contains(parent))
1
if (isValidValue(object, child, eReference))
2
                {
2
        {
3
                  continue LOOP;
3
          
4
        
4
return eReference;
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.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)1495.0
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    17
    if (mappings.contains(parent))
    17
    if (mappings.contains(parent))
    3
    if (isValidValue(object, child, eReference))
    Differences
    Expression1Expression2Difference
    containsisValidValueMETHOD_INVOCATION_NAME_MISMATCH
    mappings.contains(parent)isValidValue(object,child,eReference)ARGUMENT_NUMBER_MISMATCH
    mappingsMISSING_METHOD_INVOCATION_EXPRESSION
    3
    if (isValidValue(object, child, eReference))
                                              
    4
    return eReference;
    Preondition Violations
    Unmatched return eReference;
    4
    return eReference;
    18
    continue LOOP;
    18
    continue LOOP;
    Preondition Violations
    Unmatched continue LOOP;
                                        
    Precondition Violations (2)
    Row Violation
    1Unmatched return eReference;
    2Unmatched continue LOOP;