switch (featureID) { case EcorePackage.ENAMED_ELEMENT__EANNOTATIONS: return getEAnnotations(); case EcorePackage.ENAMED_ELEMENT__NAME: return getName(); } return eDynamicGet(featureID, resolve, coreType);
switch (featureID) { case EcorePackage.ESTRING_TO_STRING_MAP_ENTRY__KEY: return getTypedKey(); case EcorePackage.ESTRING_TO_STRING_MAP_ENTRY__VALUE: return getTypedValue(); } return eDynamicGet(featureID, resolve, coreType);
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: Object eGet(int, boolean, boolean) Method name: Object eGet(int, boolean, boolean)
Number of AST nodes: 6 Number of AST nodes: 6
1
switch (featureID)
1
switch (featureID)
2
    {
2
    {
3
      case EcorePackage.ENAMED_ELEMENT__EANNOTATIONS:
3
      case EcorePackage.ESTRING_TO_STRING_MAP_ENTRY__KEY:
4
        return getEAnnotations();
4
        return getTypedKey();
5
      case EcorePackage.ENAMED_ELEMENT__NAME:
5
      case EcorePackage.ESTRING_TO_STRING_MAP_ENTRY__VALUE:
6
        return getName();
6
        return getTypedValue();
7
    }
7
    }
8
    return eDynamicGet(featureID, resolve, coreType);
8
    return eDynamicGet(featureID, resolve, coreType);
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 comparisons14
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements5
    Number of unmapped statements in the first code fragment1
    Number of unmapped statements in the second code fragment1
    Time elapsed for statement mapping (ms)0.8
    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
    return getTypedKey();
    Preondition Violations
    Unmatched return getTypedKey();
    3
    return getTypedKey();
    3
    return getEAnnotations();
    3
    return getEAnnotations();
    Preondition Violations
    Unmatched return getEAnnotations();
                                                            
    4
    case EcorePackage.ENAMED_ELEMENT__NAME:
    4
    case EcorePackage.ENAMED_ELEMENT__NAME:
    4
    case EcorePackage.ESTRING_TO_STRING_MAP_ENTRY__VALUE:
    Differences
    Expression1Expression2Difference
    ENAMED_ELEMENT__NAMEESTRING_TO_STRING_MAP_ENTRY__VALUEVARIABLE_NAME_MISMATCH
    4
    case EcorePackage.ESTRING_TO_STRING_MAP_ENTRY__VALUE:
    5
    return getName();
    5
    return getName();
    5
    return getTypedValue();
    Differences
    Expression1Expression2Difference
    getNamegetTypedValueMETHOD_INVOCATION_NAME_MISMATCH
    5
    return getTypedValue();
    6
    return eDynamicGet(featureID, resolve, coreType);
    6
    return eDynamicGet(featureID, resolve, coreType);
    Precondition Violations (2)
    Row Violation
    1Unmatched return getTypedKey();
    2Unmatched return getEAnnotations();