switch (featureID) { case EcorePackage.EFACTORY__EANNOTATIONS: getEAnnotations().clear(); return; case EcorePackage.EFACTORY__EPACKAGE: setEPackage((EPackage)null); return; } eDynamicUnset(featureID);
switch (featureID) { case EcorePackage.ESTRING_TO_STRING_MAP_ENTRY__KEY: setTypedKey(KEY_EDEFAULT); return; case EcorePackage.ESTRING_TO_STRING_MAP_ENTRY__VALUE: setTypedValue(VALUE_EDEFAULT); return; } eDynamicUnset(featureID);
Clone fragments detected by clone detection tool
File path: /emf-2.4.1/src/org/eclipse/emf/ecore/impl/EFactoryImpl.java File path: /emf-2.4.1/src/org/eclipse/emf/ecore/impl/EStringToStringMapEntryImpl.java
Method name: void eUnset(int) Method name: void eUnset(int)
Number of AST nodes: 8 Number of AST nodes: 8
1
switch (featureID)
1
switch (featureID)
2
    {
2
    {
3
      case EcorePackage.EFACTORY__EANNOTATIONS:
3
      case EcorePackage.ESTRING_TO_STRING_MAP_ENTRY__KEY:
4
        getEAnnotations().clear();
4
        setTypedKey(KEY_EDEFAULT);
5
        return;
5
        return;
6
      case EcorePackage.EFACTORY__EPACKAGE:
6
      case EcorePackage.E
7
        setEPackage((EPackage)null
7
STRING_TO_STRING_MAP_ENTRY__VALUE:
8
);
8
        setTypedValue(VALUE_EDEFAULT);
9
        return;
9
        return;
10
    }
10
    }
11
    eDynamicUnset(featureID);
11
    eDynamicUnset(featureID);
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 having the same super class
Number of node comparisons29
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements7
    Number of unmapped statements in the first code fragment1
    Number of unmapped statements in the second code fragment1
    Time elapsed for statement mapping (ms)1.1
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    switch (featureID)
    1
    switch (featureID)
    2
    case EcorePackage.EFACTORY__EANNOTATIONS:
    2
    case EcorePackage.EFACTORY__EANNOTATIONS:
    2
    case EcorePackage.ESTRING_TO_STRING_MAP_ENTRY__KEY:
    Differences
    Expression1Expression2Difference
    EFACTORY__EANNOTATIONSESTRING_TO_STRING_MAP_ENTRY__KEYVARIABLE_NAME_MISMATCH
    2
    case EcorePackage.ESTRING_TO_STRING_MAP_ENTRY__KEY:
    3
    getEAnnotations().clear();
    3
    getEAnnotations().clear();
    3
    setTypedKey(KEY_EDEFAULT);
    Differences
    Expression1Expression2Difference
    clearsetTypedKeyMETHOD_INVOCATION_NAME_MISMATCH
    getEAnnotations().clear()setTypedKey(KEY_EDEFAULT)ARGUMENT_NUMBER_MISMATCH
    getEAnnotations()MISSING_METHOD_INVOCATION_EXPRESSION
    Preondition Violations
    Expression getEAnnotations().clear() is a void method call, and thus it cannot be parameterized
    Expression setTypedKey(KEY_EDEFAULT) is a void method call, and thus it cannot be parameterized
    Expression getEAnnotations().clear() is a void method call, and thus it cannot be parameterized
    Expression setTypedKey(KEY_EDEFAULT) is a void method call, and thus it cannot be parameterized
    3
    setTypedKey(KEY_EDEFAULT);
    4
    return;
    4
    return;
    5
    case EcorePackage.EFACTORY__EPACKAGE:
    5
    case EcorePackage.EFACTORY__EPACKAGE:
    5
    case EcorePackage.ESTRING_TO_STRING_MAP_ENTRY__VALUE:
    Differences
    Expression1Expression2Difference
    EFACTORY__EPACKAGEESTRING_TO_STRING_MAP_ENTRY__VALUEVARIABLE_NAME_MISMATCH
    5
    case EcorePackage.ESTRING_TO_STRING_MAP_ENTRY__VALUE:
                                                                      
    6
    setTypedValue(VALUE_EDEFAULT);
    6
    setEPackage((EPackage)null);
                                                                  
    7
    return;
    7
    return;
    8
    eDynamicUnset(featureID);
    8
    eDynamicUnset(featureID);
    Precondition Violations (4)
    Row Violation
    1Expression getEAnnotations().clear() is a void method call, and thus it cannot be parameterized
    2Expression setTypedKey(KEY_EDEFAULT) is a void method call, and thus it cannot be parameterized
    3Expression getEAnnotations().clear() is a void method call, and thus it cannot be parameterized
    4Expression setTypedKey(KEY_EDEFAULT) is a void method call, and thus it cannot be parameterized