switch (featureID) { case EcorePackage.ECLASSIFIER__EANNOTATIONS: return ((InternalEList<InternalEObject>)(InternalEList<?>)getEAnnotations()).basicAdd(otherEnd, msgs); case EcorePackage.ECLASSIFIER__EPACKAGE: if (eInternalContainer() != null) msgs = eBasicRemoveFromContainer(msgs); return eBasicSetContainer(otherEnd, EcorePackage.ECLASSIFIER__EPACKAGE, msgs); } return eDynamicInverseAdd(otherEnd, featureID, msgs);
switch (featureID) { case EcorePackage.EPARAMETER__EANNOTATIONS: return ((InternalEList<InternalEObject>)(InternalEList<?>)getEAnnotations()).basicAdd(otherEnd, msgs); case EcorePackage.EPARAMETER__EOPERATION: if (eInternalContainer() != null) msgs = eBasicRemoveFromContainer(msgs); return eBasicSetContainer(otherEnd, EcorePackage.EPARAMETER__EOPERATION, msgs); } return eDynamicInverseAdd(otherEnd, featureID, msgs);
Clone fragments detected by clone detection tool
File path: /emf-2.4.1/src/org/eclipse/emf/ecore/impl/EClassifierImpl.java File path: /emf-2.4.1/src/org/eclipse/emf/ecore/impl/EParameterImpl.java
Method name: NotificationChain eInverseAdd(InternalEObject, int, NotificationChain) Method name: NotificationChain eInverseAdd(InternalEObject, int, NotificationChain)
Number of AST nodes: 8 Number of AST nodes: 8
1
switch (featureID)
1
switch (featureID)
2
    {
2
    {
3
      case EcorePackage.ECLASSIFIER__EANNOTATIONS:
3
      case EcorePackage.EPARAMETER__EANNOTATIONS:
4
        return ((InternalEList<InternalEObject>)(InternalEList<?>)getEAnnotations()).basicAdd(otherEnd, msgs);
4
        return ((InternalEList<InternalEObject>)(InternalEList<?>)getEAnnotations()).basicAdd(otherEnd, msgs);
5
      case EcorePackage.ECLASSIFIER__EPACKAGE:
5
      case EcorePackage.EPARAMETER__EOPERATION:
6
        if (eInternalContainer() != null)
6
        if (eInternalContainer() != null)
7
          msgs = eBasicRemoveFromContainer(msgs);
7
          msgs = eBasicRemoveFromContainer(msgs);
8
        return eBasicSetContainer(otherEnd, EcorePackage.ECLASSIFIER__EPACKAGE, msgs);
8
        return eBasicSetContainer(otherEnd, EcorePackage.EPARAMETER__EOPERATION, msgs);
9
    }
9
    }
10
    return eDynamicInverseAdd(otherEnd, featureID, msgs);
10
    return eDynamicInverseAdd(otherEnd, featureID, msgs);
Summary
Number of common nesting structure subtrees1
Number of refactorable cases1
Number of non-refactorable cases0
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 comparisons18
  1. {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.3
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    switch (featureID)
    1
    switch (featureID)
    2
    case EcorePackage.ECLASSIFIER__EANNOTATIONS:
    2
    case EcorePackage.ECLASSIFIER__EANNOTATIONS:
    2
    case EcorePackage.EPARAMETER__EANNOTATIONS:
    Differences
    Expression1Expression2Difference
    ECLASSIFIER__EANNOTATIONSEPARAMETER__EANNOTATIONSVARIABLE_NAME_MISMATCH
    2
    case EcorePackage.EPARAMETER__EANNOTATIONS:
    3
    return ((InternalEList<InternalEObject>)(InternalEList<?>)getEAnnotations()).basicAdd(otherEnd, msgs);
    3
    return ((InternalEList<InternalEObject>)(InternalEList<?>)getEAnnotations()).basicAdd(otherEnd, msgs);
    4
    case EcorePackage.ECLASSIFIER__EPACKAGE:
    4
    case EcorePackage.ECLASSIFIER__EPACKAGE:
    4
    case EcorePackage.EPARAMETER__EOPERATION:
    Differences
    Expression1Expression2Difference
    ECLASSIFIER__EPACKAGEEPARAMETER__EOPERATIONVARIABLE_NAME_MISMATCH
    4
    case EcorePackage.EPARAMETER__EOPERATION:
    5
    if (eInternalContainer() != null)
    5
    if (eInternalContainer() != null)
    6
    msgs = eBasicRemoveFromContainer(msgs);
    6
    msgs = eBasicRemoveFromContainer(msgs);
    7
    return eBasicSetContainer(otherEnd, EcorePackage.ECLASSIFIER__EPACKAGE, msgs);
    7
    return eBasicSetContainer(otherEnd, EcorePackage.ECLASSIFIER__EPACKAGE, msgs);
    7
    return eBasicSetContainer(otherEnd, EcorePackage.EPARAMETER__EOPERATION, msgs);
    Differences
    Expression1Expression2Difference
    ECLASSIFIER__EPACKAGEEPARAMETER__EOPERATIONVARIABLE_NAME_MISMATCH
    7
    return eBasicSetContainer(otherEnd, EcorePackage.EPARAMETER__EOPERATION, msgs);
    8
    return eDynamicInverseAdd(otherEnd, featureID, msgs);
    8
    return eDynamicInverseAdd(otherEnd, featureID, msgs);
    Precondition Violations (0)
    Row Violation