EGenericType oldELowerBound = eLowerBound; eLowerBound = newELowerBound; if (eNotificationRequired()) { ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, EcorePackage.EGENERIC_TYPE__ELOWER_BOUND, oldELowerBound, newELowerBound); if (msgs == null) msgs = notification; else msgs.add(notification); } return msgs;
EGenericType oldEUpperBound = eUpperBound; eUpperBound = newEUpperBound; if (eNotificationRequired()) { ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, EcorePackage.EGENERIC_TYPE__EUPPER_BOUND, oldEUpperBound, newEUpperBound); if (msgs == null) msgs = notification; else msgs.add(notification); } return msgs;
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: NotificationChain basicSetELowerBound(EGenericType, NotificationChain) Method name: NotificationChain basicSetEUpperBound(EGenericType, NotificationChain)
Number of AST nodes: 8 Number of AST nodes: 8
1
EGenericType oldELowerBound = eLowerBound;
1
EGenericType oldEUpperBound = eUpperBound;
2
    eLowerBound = newELowerBound;
2
    eUpperBound = newEUpperBound;
3
    if (eNotificationRequired())
3
    if (eNotificationRequired())
4
    {
4
    {
5
      ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, EcorePackage.EGENERIC_TYPE__ELOWER_BOUND, oldELowerBound, newELowerBound);
5
      ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, EcorePackage.EGENERIC_TYPE__EUPPER_BOUND, oldEUpperBound, newEUpperBound);
6
      if (msgs == null) msgs = notification; else msgs.add(notification);
6
      if (msgs == null) msgs = notification; else msgs.add(notification);
7
    }
7
    }
8
    return msgs;
8
    return 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 declared in the same class
Number of node comparisons18
  1. {Non-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.1
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    EGenericType oldELowerBound = eLowerBound;
    1
    EGenericType oldELowerBound = eLowerBound;
    1
    EGenericType oldEUpperBound = eUpperBound;
    Differences
    Expression1Expression2Difference
    oldELowerBoundoldEUpperBoundVARIABLE_NAME_MISMATCH
    eLowerBoundeUpperBoundVARIABLE_NAME_MISMATCH
    1
    EGenericType oldEUpperBound = eUpperBound;
    2
    eLowerBound = newELowerBound;
    2
    eLowerBound = newELowerBound;
    2
    eUpperBound = newEUpperBound;
    Differences
    Expression1Expression2Difference
    eLowerBoundeUpperBoundVARIABLE_NAME_MISMATCH
    newELowerBoundnewEUpperBoundVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression eLowerBound is a field being modified, and thus it cannot be parameterized
    Expression eUpperBound is a field being modified, and thus it cannot be parameterized
    2
    eUpperBound = newEUpperBound;
    3
    if (eNotificationRequired())
    3
    if (eNotificationRequired())
    4
    ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, EcorePackage.EGENERIC_TYPE__ELOWER_BOUND, oldELowerBound, newELowerBound);
    4
    ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, EcorePackage.EGENERIC_TYPE__ELOWER_BOUND, oldELowerBound, newELowerBound);
    4
    ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, EcorePackage.EGENERIC_TYPE__EUPPER_BOUND, oldEUpperBound, newEUpperBound);
    Differences
    Expression1Expression2Difference
    EGENERIC_TYPE__ELOWER_BOUNDEGENERIC_TYPE__EUPPER_BOUNDVARIABLE_NAME_MISMATCH
    oldELowerBoundoldEUpperBoundVARIABLE_NAME_MISMATCH
    newELowerBoundnewEUpperBoundVARIABLE_NAME_MISMATCH
    4
    ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, EcorePackage.EGENERIC_TYPE__EUPPER_BOUND, oldEUpperBound, newEUpperBound);
    5
    if (msgs == null)
    5
    if (msgs == null)
    6
    msgs = notification;
    6
    msgs = notification;
    else
    else
    7
    msgs.add(notification);
    7
    msgs.add(notification);
    8
    return msgs;
    8
    return msgs;
    Precondition Violations (2)
    Row Violation
    1Expression eLowerBound is a field being modified, and thus it cannot be parameterized
    2Expression eUpperBound is a field being modified, and thus it cannot be parameterized