switch (featureID) { case EcorePackage.EOPERATION__EANNOTATIONS: return ((InternalEList<?>)getEAnnotations()).basicRemove(otherEnd, msgs); case EcorePackage.EOPERATION__EGENERIC_TYPE: return basicUnsetEGenericType(msgs); case EcorePackage.EOPERATION__ECONTAINING_CLASS: return eBasicSetContainer(null, EcorePackage.EOPERATION__ECONTAINING_CLASS, msgs); case EcorePackage.EOPERATION__ETYPE_PARAMETERS: return ((InternalEList<?>)getETypeParameters()).basicRemove(otherEnd, msgs); case EcorePackage.EOPERATION__EPARAMETERS: return ((InternalEList<?>)getEParameters()).basicRemove(otherEnd, msgs); case EcorePackage.EOPERATION__EGENERIC_EXCEPTIONS: return ((InternalEList<?>)getEGenericExceptions()).basicRemove(otherEnd, msgs); } return eDynamicInverseRemove(otherEnd, featureID, msgs);
switch (featureID) { case EcorePackage.ECLASS__EANNOTATIONS: return ((InternalEList<?>)getEAnnotations()).basicRemove(otherEnd, msgs); case EcorePackage.ECLASS__EPACKAGE: return eBasicSetContainer(null, EcorePackage.ECLASS__EPACKAGE, msgs); case EcorePackage.ECLASS__ETYPE_PARAMETERS: return ((InternalEList<?>)getETypeParameters()).basicRemove(otherEnd, msgs); case EcorePackage.ECLASS__EOPERATIONS: return ((InternalEList<?>)getEOperations()).basicRemove(otherEnd, msgs); case EcorePackage.ECLASS__ESTRUCTURAL_FEATURES: return ((InternalEList<?>)getEStructuralFeatures()).basicRemove(otherEnd, msgs); case EcorePackage.ECLASS__EGENERIC_SUPER_TYPES: return ((InternalEList<?>)getEGenericSuperTypes()).basicRemove(otherEnd, msgs); } return eDynamicInverseRemove(otherEnd, featureID, msgs);
Clone fragments detected by clone detection tool
File path: /emf-2.4.1/src/org/eclipse/emf/ecore/impl/EOperationImpl.java File path: /emf-2.4.1/src/org/eclipse/emf/ecore/impl/EClassImpl.java
Method name: NotificationChain eInverseRemove(InternalEObject, int, NotificationChain) Method name: NotificationChain eInverseRemove(InternalEObject, int, NotificationChain)
Number of AST nodes: 14 Number of AST nodes: 14
1
switch (featureID)
1
switch (featureID)
2
    {
2
    {
3
      case EcorePackage.EOPERATION__EANNOTATIONS:
3
      case EcorePackage.ECLASS__EANNOTATIONS:
4
        return ((InternalEList<?>)getEAnnotations()).basicRemove(otherEnd, msgs);
4
        return ((InternalEList<?>)getEAnnotations()).basicRemove(otherEnd, msgs);
5
      case EcorePackage.EOPERATION__EGENERIC_TYPE:
5
      case EcorePackage.ECLASS__EPACKAGE:
6
        return basicUnsetEGenericType(msgs);
6
        return eBasicSetContainer(null, EcorePackage.ECLASS__EPACKAGE, msgs);
7
      case EcorePackage.EOPERATION__ECONTAINING_CLASS:
7
      case EcorePackage.ECLASS__ETYPE_PARAMETERS:
8
        return eBasicSetContainer(null, EcorePackage.EOPERATION__ECONTAINING_CLASS, msgs);
8
        return ((InternalEList<?>)getETypeParameters()).basicRemove(otherEnd, msgs);
9
      case EcorePackage.EOPERATION__ETYPE_PARAMETERS:
9
      case EcorePackage.ECLASS__EOPERATIONS:
10
        return ((InternalEList<?>)getETypeParameters()).basicRemove(otherEnd, msgs);
10
        return ((InternalEList<?>)getEOperations()).basicRemove(otherEnd, msgs);
11
      case EcorePackage.EOPERATION__EPARAMETERS:
11
      case EcorePackage.ECLASS__ESTRUCTURAL_FEATURES:
12
        return ((InternalEList<?>)getEParameters()).basicRemove(otherEnd, msgs);
12
        return ((InternalEList<?>)getEStructuralFeatures()).basicRemove(otherEnd, msgs);
13
      case EcorePackage.EOPERATION__EGENERIC_EXCEPTIONS:
13
      case EcorePackage.ECLASS__EGENERIC_SUPER_TYPES:
14
        return ((InternalEList<?>)getEGenericExceptions()).basicRemove(otherEnd, msgs);
14
        return ((InternalEList<?>)getEGenericSuperTypes()).basicRemove(otherEnd, msgs);
15
    }
15
    }
16
    return eDynamicInverseRemove(otherEnd, featureID, msgs);
16
    return eDynamicInverseRemove(otherEnd, featureID, msgs);
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 comparisons86
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements14
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)6.3
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    switch (featureID)
    1
    switch (featureID)
    2
    case EcorePackage.EOPERATION__EANNOTATIONS:
    2
    case EcorePackage.EOPERATION__EANNOTATIONS:
    2
    case EcorePackage.ECLASS__EANNOTATIONS:
    Differences
    Expression1Expression2Difference
    EOPERATION__EANNOTATIONSECLASS__EANNOTATIONSVARIABLE_NAME_MISMATCH
    2
    case EcorePackage.ECLASS__EANNOTATIONS:
    3
    return ((InternalEList<?>)getEAnnotations()).basicRemove(otherEnd, msgs);
    3
    return ((InternalEList<?>)getEAnnotations()).basicRemove(otherEnd, msgs);
    4
    case EcorePackage.EOPERATION__EGENERIC_TYPE:
    4
    case EcorePackage.EOPERATION__EGENERIC_TYPE:
    4
    case EcorePackage.ECLASS__EPACKAGE:
    Differences
    Expression1Expression2Difference
    EOPERATION__EGENERIC_TYPEECLASS__EPACKAGEVARIABLE_NAME_MISMATCH
    4
    case EcorePackage.ECLASS__EPACKAGE:
    5
    return basicUnsetEGenericType(msgs);
    5
    return basicUnsetEGenericType(msgs);
    5
    return eBasicSetContainer(null, EcorePackage.ECLASS__EPACKAGE, msgs);
    Differences
    Expression1Expression2Difference
    basicUnsetEGenericTypeeBasicSetContainerMETHOD_INVOCATION_NAME_MISMATCH
    basicUnsetEGenericType(msgs)eBasicSetContainer(null,EcorePackage.ECLASS__EPACKAGE,msgs)ARGUMENT_NUMBER_MISMATCH
    5
    return eBasicSetContainer(null, EcorePackage.ECLASS__EPACKAGE, msgs);
    6
    case EcorePackage.EOPERATION__ECONTAINING_CLASS:
    6
    case EcorePackage.EOPERATION__ECONTAINING_CLASS:
    6
    case EcorePackage.ECLASS__ETYPE_PARAMETERS:
    Differences
    Expression1Expression2Difference
    EOPERATION__ECONTAINING_CLASSECLASS__ETYPE_PARAMETERSVARIABLE_NAME_MISMATCH
    6
    case EcorePackage.ECLASS__ETYPE_PARAMETERS:
    7
    return eBasicSetContainer(null, EcorePackage.EOPERATION__ECONTAINING_CLASS, msgs);
    7
    return eBasicSetContainer(null, EcorePackage.EOPERATION__ECONTAINING_CLASS, msgs);
    7
    return ((InternalEList<?>)getETypeParameters()).basicRemove(otherEnd, msgs);
    Differences
    Expression1Expression2Difference
    eBasicSetContainerbasicRemoveMETHOD_INVOCATION_NAME_MISMATCH
    eBasicSetContainer(null,EcorePackage.EOPERATION__ECONTAINING_CLASS,msgs)((InternalEList)getETypeParameters()).basicRemove(otherEnd,msgs)ARGUMENT_NUMBER_MISMATCH
    ((InternalEList)getETypeParameters())MISSING_METHOD_INVOCATION_EXPRESSION
    7
    return ((InternalEList<?>)getETypeParameters()).basicRemove(otherEnd, msgs);
    8
    case EcorePackage.EOPERATION__ETYPE_PARAMETERS:
    8
    case EcorePackage.EOPERATION__ETYPE_PARAMETERS:
    8
    case EcorePackage.ECLASS__EOPERATIONS:
    Differences
    Expression1Expression2Difference
    EOPERATION__ETYPE_PARAMETERSECLASS__EOPERATIONSVARIABLE_NAME_MISMATCH
    8
    case EcorePackage.ECLASS__EOPERATIONS:
    9
    return ((InternalEList<?>)getETypeParameters()).basicRemove(otherEnd, msgs);
    9
    return ((InternalEList<?>)getETypeParameters()).basicRemove(otherEnd, msgs);
    9
    return ((InternalEList<?>)getEOperations()).basicRemove(otherEnd, msgs);
    Differences
    Expression1Expression2Difference
    getETypeParametersgetEOperationsMETHOD_INVOCATION_NAME_MISMATCH
    org.eclipse.emf.common.util.EListorg.eclipse.emf.common.util.EListVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type org.eclipse.emf.common.util.EList<org.eclipse.emf.ecore.ETypeParameter> of variable getETypeParameters() does not match with type org.eclipse.emf.common.util.EList<org.eclipse.emf.ecore.EOperation> of variable getEOperations()
    • Make classes org.eclipse.emf.common.util.EList and org.eclipse.emf.common.util.EList extend a common superclass
    9
    return ((InternalEList<?>)getEOperations()).basicRemove(otherEnd, msgs);
    10
    case EcorePackage.EOPERATION__EPARAMETERS:
    10
    case EcorePackage.EOPERATION__EPARAMETERS:
    10
    case EcorePackage.ECLASS__ESTRUCTURAL_FEATURES:
    Differences
    Expression1Expression2Difference
    EOPERATION__EPARAMETERSECLASS__ESTRUCTURAL_FEATURESVARIABLE_NAME_MISMATCH
    10
    case EcorePackage.ECLASS__ESTRUCTURAL_FEATURES:
    11
    return ((InternalEList<?>)getEParameters()).basicRemove(otherEnd, msgs);
    11
    return ((InternalEList<?>)getEParameters()).basicRemove(otherEnd, msgs);
    11
    return ((InternalEList<?>)getEStructuralFeatures()).basicRemove(otherEnd, msgs);
    Differences
    Expression1Expression2Difference
    getEParametersgetEStructuralFeaturesMETHOD_INVOCATION_NAME_MISMATCH
    org.eclipse.emf.common.util.EListorg.eclipse.emf.common.util.EListVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type org.eclipse.emf.common.util.EList<org.eclipse.emf.ecore.EParameter> of variable getEParameters() does not match with type org.eclipse.emf.common.util.EList<org.eclipse.emf.ecore.EStructuralFeature> of variable getEStructuralFeatures()
    • Make classes org.eclipse.emf.common.util.EList and org.eclipse.emf.common.util.EList extend a common superclass
    11
    return ((InternalEList<?>)getEStructuralFeatures()).basicRemove(otherEnd, msgs);
    12
    case EcorePackage.EOPERATION__EGENERIC_EXCEPTIONS:
    12
    case EcorePackage.EOPERATION__EGENERIC_EXCEPTIONS:
    12
    case EcorePackage.ECLASS__EGENERIC_SUPER_TYPES:
    Differences
    Expression1Expression2Difference
    EOPERATION__EGENERIC_EXCEPTIONSECLASS__EGENERIC_SUPER_TYPESVARIABLE_NAME_MISMATCH
    12
    case EcorePackage.ECLASS__EGENERIC_SUPER_TYPES:
    13
    return ((InternalEList<?>)getEGenericExceptions()).basicRemove(otherEnd, msgs);
    13
    return ((InternalEList<?>)getEGenericExceptions()).basicRemove(otherEnd, msgs);
    13
    return ((InternalEList<?>)getEGenericSuperTypes()).basicRemove(otherEnd, msgs);
    Differences
    Expression1Expression2Difference
    getEGenericExceptionsgetEGenericSuperTypesMETHOD_INVOCATION_NAME_MISMATCH
    13
    return ((InternalEList<?>)getEGenericSuperTypes()).basicRemove(otherEnd, msgs);
    14
    return eDynamicInverseRemove(otherEnd, featureID, msgs);
    14
    return eDynamicInverseRemove(otherEnd, featureID, msgs);
    Precondition Violations (2)
    Row Violation
    1Type org.eclipse.emf.common.util.EList<org.eclipse.emf.ecore.ETypeParameter> of variable getETypeParameters() does not match with type org.eclipse.emf.common.util.EList<org.eclipse.emf.ecore.EOperation> of variable getEOperations()
    2Type org.eclipse.emf.common.util.EList<org.eclipse.emf.ecore.EParameter> of variable getEParameters() does not match with type org.eclipse.emf.common.util.EList<org.eclipse.emf.ecore.EStructuralFeature> of variable getEStructuralFeatures()