switch (featureID) { case EcorePackage.ENAMED_ELEMENT__EANNOTATIONS: getEAnnotations().clear(); return; case EcorePackage.ENAMED_ELEMENT__NAME: setName(NAME_EDEFAULT); 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/ENamedElementImpl.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.ENAMED_ELEMENT__EANNOTATIONS:
3
      case EcorePackage.ESTRING_TO_STRING_MAP_ENTRY__KEY:
4
        getEAnnotations().clear();
4
        setTypedKey(KEY_EDEFAULT);
5
        return;
5
        return;
6
      case EcorePackage.ENAMED_ELEMENT__NAME:
6
      case EcorePackage.ESTRING_TO_STRING_MAP_ENTRY__VALUE:
7
        setName(NAME_EDEFAULT);
7
        setTypedValue(VALUE_EDEFAULT);
8
        return;
8
        return;
9
    }
9
    }
10
    eDynamicUnset(featureID);
10
    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.0
Clones locationClones are in different classes having the same super class
Number of node comparisons29
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements8
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    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.ENAMED_ELEMENT__EANNOTATIONS:
    2
    case EcorePackage.ENAMED_ELEMENT__EANNOTATIONS:
    2
    case EcorePackage.ESTRING_TO_STRING_MAP_ENTRY__KEY:
    Differences
    Expression1Expression2Difference
    ENAMED_ELEMENT__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.ENAMED_ELEMENT__NAME:
    5
    case EcorePackage.ENAMED_ELEMENT__NAME:
    5
    case EcorePackage.ESTRING_TO_STRING_MAP_ENTRY__VALUE:
    Differences
    Expression1Expression2Difference
    ENAMED_ELEMENT__NAMEESTRING_TO_STRING_MAP_ENTRY__VALUEVARIABLE_NAME_MISMATCH
    5
    case EcorePackage.ESTRING_TO_STRING_MAP_ENTRY__VALUE:
    6
    setName(NAME_EDEFAULT);
    6
    setName(NAME_EDEFAULT);
    6
    setTypedValue(VALUE_EDEFAULT);
    Differences
    Expression1Expression2Difference
    setNamesetTypedValueMETHOD_INVOCATION_NAME_MISMATCH
    NAME_EDEFAULTVALUE_EDEFAULTVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression setName(NAME_EDEFAULT) is a void method call, and thus it cannot be parameterized
    Expression setTypedValue(VALUE_EDEFAULT) is a void method call, and thus it cannot be parameterized
    6
    setTypedValue(VALUE_EDEFAULT);
    7
    return;
    7
    return;
    8
    eDynamicUnset(featureID);
    8
    eDynamicUnset(featureID);
    Precondition Violations (6)
    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
    5Expression setName(NAME_EDEFAULT) is a void method call, and thus it cannot be parameterized
    6Expression setTypedValue(VALUE_EDEFAULT) is a void method call, and thus it cannot be parameterized