if (newELowerBound != eLowerBound) { NotificationChain msgs = null; if (eLowerBound != null) msgs = ((InternalEObject)eLowerBound).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - EcorePackage.EGENERIC_TYPE__ELOWER_BOUND, null, msgs); if (newELowerBound != null) msgs = ((InternalEObject)newELowerBound).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - EcorePackage.EGENERIC_TYPE__ELOWER_BOUND, null, msgs); msgs = basicSetELowerBound(newELowerBound, msgs); if (msgs != null) msgs.dispatch(); } else if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, EcorePackage.EGENERIC_TYPE__ELOWER_BOUND, newELowerBound, newELowerBound));
if (newEUpperBound != eUpperBound) { NotificationChain msgs = null; if (eUpperBound != null) msgs = ((InternalEObject)eUpperBound).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - EcorePackage.EGENERIC_TYPE__EUPPER_BOUND, null, msgs); if (newEUpperBound != null) msgs = ((InternalEObject)newEUpperBound).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - EcorePackage.EGENERIC_TYPE__EUPPER_BOUND, null, msgs); msgs = basicSetEUpperBound(newEUpperBound, msgs); if (msgs != null) msgs.dispatch(); } else if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, EcorePackage.EGENERIC_TYPE__EUPPER_BOUND, newEUpperBound, newEUpperBound));
Clone fragments detected by clone detection tool
File path: /emf-2.4.1/src/org/eclipse/emf/ecore/impl/EGenericTypeImpl.java File path: /emf-2.4.1/src/org/eclipse/emf/ecore/impl/EGenericTypeImpl.java
Method name: void setELowerBound(EGenericType) Method name: void setEUpperBound(EGenericType)
Number of AST nodes: 11 Number of AST nodes: 11
1
if (newELowerBound != eLowerBound)
1
if (newEUpperBound != eUpperBound)
2
    {
2
    {
3
      NotificationChain msgs = null;
3
      NotificationChain msgs = null;
4
      if (eLowerBound != null)
4
      if (eUpperBound != null)
5
        msgs = ((InternalEObject)eLowerBound).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - EcorePackage.EGENERIC_TYPE__ELOWER_BOUND, null, msgs);
5
        msgs = ((InternalEObject)eUpperBound).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - EcorePackage.EGENERIC_TYPE__EUPPER_BOUND, null, msgs);
6
      if (newELowerBound != null)
6
      if (newEUpperBound != null)
7
        msgs = ((InternalEObject)newELowerBound).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - EcorePackage.EGENERIC_TYPE__ELOWER_BOUND, null, msgs);
7
        msgs = ((InternalEObject)newEUpperBound).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - EcorePackage.EGENERIC_TYPE__EUPPER_BOUND, null, msgs);
8
      msgs = basicSetELowerBound(newELowerBound, msgs);
8
      msgs = basicSetEUpperBound(newEUpperBound, msgs);
9
      if (msgs != null) msgs.dispatch();
9
      if (msgs != null) msgs.dispatch();
10
    }
10
    }
11
    else if (eNotificationRequired())
11
    else if (eNotificationRequired())
12
      eNotify(new ENotificationImpl(this, Notification.SET, EcorePackage.EGENERIC_TYPE__ELOWER_BOUND, newELowerBound, newELowerBound));
12
      eNotify(new ENotificationImpl(this, Notification.SET, EcorePackage.EGENERIC_TYPE__EUPPER_BOUND, newEUpperBound, newEUpperBound));
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.4
Clones locationClones are declared in the same class
Number of node comparisons40
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements11
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)2.7
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    if (newELowerBound != eLowerBound)
    1
    if (newELowerBound != eLowerBound)
    1
    if (newEUpperBound != eUpperBound)
    Differences
    Expression1Expression2Difference
    newELowerBoundnewEUpperBoundVARIABLE_NAME_MISMATCH
    eLowerBoundeUpperBoundVARIABLE_NAME_MISMATCH
    1
    if (newEUpperBound != eUpperBound)
    2
    NotificationChain msgs = null;
    2
    NotificationChain msgs = null;
    3
    if (eLowerBound != null)
    3
    if (eLowerBound != null)
    3
    if (eUpperBound != null)
    Differences
    Expression1Expression2Difference
    eLowerBoundeUpperBoundVARIABLE_NAME_MISMATCH
    3
    if (eUpperBound != null)
    4
    msgs = ((InternalEObject)eLowerBound).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - EcorePackage.EGENERIC_TYPE__ELOWER_BOUND, null, msgs);
    4
    msgs = ((InternalEObject)eLowerBound).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - EcorePackage.EGENERIC_TYPE__ELOWER_BOUND, null, msgs);
    4
    msgs = ((InternalEObject)eUpperBound).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - EcorePackage.EGENERIC_TYPE__EUPPER_BOUND, null, msgs);
    Differences
    Expression1Expression2Difference
    EGENERIC_TYPE__ELOWER_BOUNDEGENERIC_TYPE__EUPPER_BOUNDVARIABLE_NAME_MISMATCH
    eLowerBoundeUpperBoundVARIABLE_NAME_MISMATCH
    4
    msgs = ((InternalEObject)eUpperBound).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - EcorePackage.EGENERIC_TYPE__EUPPER_BOUND, null, msgs);
    5
    if (newELowerBound != null)
    5
    if (newELowerBound != null)
    5
    if (newEUpperBound != null)
    Differences
    Expression1Expression2Difference
    newELowerBoundnewEUpperBoundVARIABLE_NAME_MISMATCH
    5
    if (newEUpperBound != null)
    6
    msgs = ((InternalEObject)newELowerBound).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - EcorePackage.EGENERIC_TYPE__ELOWER_BOUND, null, msgs);
    6
    msgs = ((InternalEObject)newELowerBound).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - EcorePackage.EGENERIC_TYPE__ELOWER_BOUND, null, msgs);
    6
    msgs = ((InternalEObject)newEUpperBound).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - EcorePackage.EGENERIC_TYPE__EUPPER_BOUND, null, msgs);
    Differences
    Expression1Expression2Difference
    EGENERIC_TYPE__ELOWER_BOUNDEGENERIC_TYPE__EUPPER_BOUNDVARIABLE_NAME_MISMATCH
    newELowerBoundnewEUpperBoundVARIABLE_NAME_MISMATCH
    6
    msgs = ((InternalEObject)newEUpperBound).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - EcorePackage.EGENERIC_TYPE__EUPPER_BOUND, null, msgs);
    7
    msgs = basicSetELowerBound(newELowerBound, msgs);
    7
    msgs = basicSetELowerBound(newELowerBound, msgs);
    7
    msgs = basicSetEUpperBound(newEUpperBound, msgs);
    Differences
    Expression1Expression2Difference
    basicSetELowerBoundbasicSetEUpperBoundMETHOD_INVOCATION_NAME_MISMATCH
    newELowerBoundnewEUpperBoundVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression basicSetELowerBound(newELowerBound,msgs) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression basicSetEUpperBound(newEUpperBound,msgs) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    7
    msgs = basicSetEUpperBound(newEUpperBound, msgs);
    8
    if (msgs != null)
    8
    if (msgs != null)
    9
    msgs.dispatch();
    9
    msgs.dispatch();
    10
    else if (eNotificationRequired())
    10
    else if (eNotificationRequired())
    11
    eNotify(new ENotificationImpl(this, Notification.SET, EcorePackage.EGENERIC_TYPE__ELOWER_BOUND, newELowerBound, newELowerBound));
    11
    eNotify(new ENotificationImpl(this, Notification.SET, EcorePackage.EGENERIC_TYPE__ELOWER_BOUND, newELowerBound, newELowerBound));
    11
    eNotify(new ENotificationImpl(this, Notification.SET, EcorePackage.EGENERIC_TYPE__EUPPER_BOUND, newEUpperBound, newEUpperBound));
    Differences
    Expression1Expression2Difference
    EGENERIC_TYPE__ELOWER_BOUNDEGENERIC_TYPE__EUPPER_BOUNDVARIABLE_NAME_MISMATCH
    newELowerBoundnewEUpperBoundVARIABLE_NAME_MISMATCH
    newELowerBoundnewEUpperBoundVARIABLE_NAME_MISMATCH
    11
    eNotify(new ENotificationImpl(this, Notification.SET, EcorePackage.EGENERIC_TYPE__EUPPER_BOUND, newEUpperBound, newEUpperBound));
    Precondition Violations (2)
    Row Violation
    1Expression basicSetELowerBound(newELowerBound,msgs) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    2Expression basicSetEUpperBound(newEUpperBound,msgs) cannot be parameterized, because it has dependencies to/from statements that will be extracted