switch (eContainerFeatureID) { case EcorePackage.EOPERATION__ECONTAINING_CLASS: return eInternalContainer().eInverseRemove(this, EcorePackage.ECLASS__EOPERATIONS, EClass.class, msgs); } return eDynamicBasicRemoveFromContainer(msgs);
switch (eContainerFeatureID) { case MappingPackage.MAPPING__NESTED_IN: return eInternalContainer().eInverseRemove(this, MappingPackage.MAPPING__NESTED, Mapping.class, msgs); } return super.eBasicRemoveFromContainerFeature(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/mapping/impl/MappingImpl.java
Method name: NotificationChain eBasicRemoveFromContainerFeature(NotificationChain) Method name: NotificationChain eBasicRemoveFromContainerFeature(NotificationChain)
Number of AST nodes: 4 Number of AST nodes: 4
1
switch (eContainerFeatureID)
1
switch (eContainerFeatureID)
2
    {
2
    {
3
      case EcorePackage.EOPERATION__ECONTAINING_CLASS:
3
      case MappingPackage.MAPPING__NESTED_IN:
4
        return eInternalContainer().eInverseRemove(this, EcorePackage.ECLASS__EOPERATIONS, EClass.class, msgs);
4
        return eInternalContainer().eInverseRemove(this, MappingPackage.MAPPING__NESTED, Mapping.class, msgs);
5
    }
5
    }
6
    return eDynamicBasicRemoveFromContainer(msgs);
6
    return super.eBasicRemoveFromContainerFeature(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 comparisons6
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements4
    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.4
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    switch (eContainerFeatureID)
    1
    switch (eContainerFeatureID)
    2
    case EcorePackage.EOPERATION__ECONTAINING_CLASS:
    2
    case EcorePackage.EOPERATION__ECONTAINING_CLASS:
    2
    case MappingPackage.MAPPING__NESTED_IN:
    Differences
    Expression1Expression2Difference
    org.eclipse.emf.ecore.EcorePackageorg.eclipse.emf.mapping.MappingPackageVARIABLE_TYPE_MISMATCH
    EOPERATION__ECONTAINING_CLASSMAPPING__NESTED_INVARIABLE_NAME_MISMATCH
    Preondition Violations
    Type org.eclipse.emf.ecore.EcorePackage of variable EcorePackage does not match with type org.eclipse.emf.mapping.MappingPackage of variable MappingPackage
    • Make classes org.eclipse.emf.ecore.EcorePackage and org.eclipse.emf.mapping.MappingPackage extend a common superclass
    2
    case MappingPackage.MAPPING__NESTED_IN:
    3
    return eInternalContainer().eInverseRemove(this, EcorePackage.ECLASS__EOPERATIONS, EClass.class, msgs);
    3
    return eInternalContainer().eInverseRemove(this, EcorePackage.ECLASS__EOPERATIONS, EClass.class, msgs);
    3
    return eInternalContainer().eInverseRemove(this, MappingPackage.MAPPING__NESTED, Mapping.class, msgs);
    Differences
    Expression1Expression2Difference
    org.eclipse.emf.ecore.EcorePackageorg.eclipse.emf.mapping.MappingPackageVARIABLE_TYPE_MISMATCH
    ECLASS__EOPERATIONSMAPPING__NESTEDVARIABLE_NAME_MISMATCH
    Preondition Violations
    Type org.eclipse.emf.ecore.EcorePackage of variable EcorePackage does not match with type org.eclipse.emf.mapping.MappingPackage of variable MappingPackage
    • Make classes org.eclipse.emf.ecore.EcorePackage and org.eclipse.emf.mapping.MappingPackage extend a common superclass
    3
    return eInternalContainer().eInverseRemove(this, MappingPackage.MAPPING__NESTED, Mapping.class, msgs);
    4
    return eDynamicBasicRemoveFromContainer(msgs);
    4
    return eDynamicBasicRemoveFromContainer(msgs);
    4
    return super.eBasicRemoveFromContainerFeature(msgs);
    Differences
    Expression1Expression2Difference
    eDynamicBasicRemoveFromContainer(msgs)super.eBasicRemoveFromContainerFeature(msgs)TYPE_COMPATIBLE_REPLACEMENT
    4
    return super.eBasicRemoveFromContainerFeature(msgs);
    Precondition Violations (2)
    Row Violation
    1Type org.eclipse.emf.ecore.EcorePackage of variable EcorePackage does not match with type org.eclipse.emf.mapping.MappingPackage of variable MappingPackage
    2Type org.eclipse.emf.ecore.EcorePackage of variable EcorePackage does not match with type org.eclipse.emf.mapping.MappingPackage of variable MappingPackage