switch (featureID) { case MappingPackage.FUNCTION_NAME_PAIR__IN2OUT: setIn2out(IN2OUT_EDEFAULT); return; case MappingPackage.FUNCTION_NAME_PAIR__OUT2IN: setOut2in(OUT2IN_EDEFAULT); return; } super.eUnset(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/mapping/impl/FunctionNamePairImpl.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 MappingPackage.FUNCTION_NAME_PAIR__IN2OUT:
3
      case EcorePackage.
4
        setIn2out(IN2OUT
4
ESTRING_TO_STRING_MAP_ENTRY__KEY:
5
_EDEFAULT);
5
        setTypedKey(KEY_EDEFAULT);
6
        return;
6
        return;
7
      case MappingPackage.FUNCTION_NAME_PAIR__OUT2IN:
7
      case EcorePackage.
8
        setOut2in(OUT2IN
8
ESTRING_TO_STRING_MAP_ENTRY__VALUE:
9
_EDEFAULT);
9
        setTypedValue(VALUE_EDEFAULT);
10
        return;
10
        return;
11
    }
11
    }
12
    super.eUnset(featureID);
12
    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.7
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    switch (featureID)
    1
    switch (featureID)
    2
    case MappingPackage.FUNCTION_NAME_PAIR__IN2OUT:
    2
    case MappingPackage.FUNCTION_NAME_PAIR__IN2OUT:
    2
    case EcorePackage.ESTRING_TO_STRING_MAP_ENTRY__KEY:
    Differences
    Expression1Expression2Difference
    org.eclipse.emf.mapping.MappingPackageorg.eclipse.emf.ecore.EcorePackageVARIABLE_TYPE_MISMATCH
    FUNCTION_NAME_PAIR__IN2OUTESTRING_TO_STRING_MAP_ENTRY__KEYVARIABLE_NAME_MISMATCH
    Preondition Violations
    Type org.eclipse.emf.mapping.MappingPackage of variable MappingPackage does not match with type org.eclipse.emf.ecore.EcorePackage of variable EcorePackage
    • Make classes org.eclipse.emf.mapping.MappingPackage and org.eclipse.emf.ecore.EcorePackage extend a common superclass
    2
    case EcorePackage.ESTRING_TO_STRING_MAP_ENTRY__KEY:
    3
    setIn2out(IN2OUT_EDEFAULT);
    3
    setIn2out(IN2OUT_EDEFAULT);
    3
    setTypedKey(KEY_EDEFAULT);
    Differences
    Expression1Expression2Difference
    setIn2outsetTypedKeyMETHOD_INVOCATION_NAME_MISMATCH
    IN2OUT_EDEFAULTKEY_EDEFAULTVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression setIn2out(IN2OUT_EDEFAULT) 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 MappingPackage.FUNCTION_NAME_PAIR__OUT2IN:
    5
    case MappingPackage.FUNCTION_NAME_PAIR__OUT2IN:
    5
    case EcorePackage.ESTRING_TO_STRING_MAP_ENTRY__VALUE:
    Differences
    Expression1Expression2Difference
    org.eclipse.emf.mapping.MappingPackageorg.eclipse.emf.ecore.EcorePackageVARIABLE_TYPE_MISMATCH
    FUNCTION_NAME_PAIR__OUT2INESTRING_TO_STRING_MAP_ENTRY__VALUEVARIABLE_NAME_MISMATCH
    Preondition Violations
    Type org.eclipse.emf.mapping.MappingPackage of variable MappingPackage does not match with type org.eclipse.emf.ecore.EcorePackage of variable EcorePackage
    • Make classes org.eclipse.emf.mapping.MappingPackage and org.eclipse.emf.ecore.EcorePackage extend a common superclass
    5
    case EcorePackage.ESTRING_TO_STRING_MAP_ENTRY__VALUE:
    6
    setOut2in(OUT2IN_EDEFAULT);
    6
    setOut2in(OUT2IN_EDEFAULT);
    6
    setTypedValue(VALUE_EDEFAULT);
    Differences
    Expression1Expression2Difference
    setOut2insetTypedValueMETHOD_INVOCATION_NAME_MISMATCH
    OUT2IN_EDEFAULTVALUE_EDEFAULTVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression setOut2in(OUT2IN_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
    super.eUnset(featureID);
    8
    super.eUnset(featureID);
    8
    eDynamicUnset(featureID);
    Differences
    Expression1Expression2Difference
    super.eUnset(featureID)eDynamicUnset(featureID)TYPE_COMPATIBLE_REPLACEMENT
    Preondition Violations
    Expression super.eUnset(featureID) is a void method call, and thus it cannot be parameterized
    Expression eDynamicUnset(featureID) is a void method call, and thus it cannot be parameterized
    8
    eDynamicUnset(featureID);
    Precondition Violations (8)
    Row Violation
    1Type org.eclipse.emf.mapping.MappingPackage of variable MappingPackage does not match with type org.eclipse.emf.ecore.EcorePackage of variable EcorePackage
    2Expression setIn2out(IN2OUT_EDEFAULT) is a void method call, and thus it cannot be parameterized
    3Expression setTypedKey(KEY_EDEFAULT) is a void method call, and thus it cannot be parameterized
    4Type org.eclipse.emf.mapping.MappingPackage of variable MappingPackage does not match with type org.eclipse.emf.ecore.EcorePackage of variable EcorePackage
    5Expression setOut2in(OUT2IN_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
    7Expression super.eUnset(featureID) is a void method call, and thus it cannot be parameterized
    8Expression eDynamicUnset(featureID) is a void method call, and thus it cannot be parameterized