if (adapterFactory.isFactoryForType(type)) { return true; }
if (isValidValue(object, value, eStructuralFeature)) { return eStructuralFeature; }
Clone fragments detected by clone detection tool
File path: /emf-2.4.1/src/org/eclipse/emf/edit/provider/ComposedAdapterFactory.java File path: /emf-2.4.1/src/org/eclipse/emf/edit/provider/ItemProviderAdapter.java
Method name: boolean isFactoryForType(Object) Method name: EStructuralFeature getSetFeature(Object, Object)
Number of AST nodes: 2 Number of AST nodes: 2
1
if (adapterFactory.isFactoryForType(type))
1
if (isValidValue(object, value, eStructuralFeature))
2
      {
2
      {
3
        return true;
3
        return eStructuralFeature;
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.5
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)425.8
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    2
    if (adapterFactory.isFactoryForType(type))
    2
    if (adapterFactory.isFactoryForType(type))
    2
    if (isValidValue(object, value, eStructuralFeature))
    Differences
    Expression1Expression2Difference
    isFactoryForTypeisValidValueMETHOD_INVOCATION_NAME_MISMATCH
    adapterFactory.isFactoryForType(type)isValidValue(object,value,eStructuralFeature)ARGUMENT_NUMBER_MISMATCH
    adapterFactoryMISSING_METHOD_INVOCATION_EXPRESSION
    2
    if (isValidValue(object, value, eStructuralFeature))
                                                              
    3
    return eStructuralFeature;
    Preondition Violations
    Unmatched return eStructuralFeature;
    3
    return eStructuralFeature;
    3
    return true;
    3
    return true;
    Preondition Violations
    Unmatched return true;
                                  
    Precondition Violations (2)
    Row Violation
    1Unmatched return eStructuralFeature;
    2Unmatched return true;