if (owner.eNotificationRequired()) { Notification notification = new ENotificationImpl (owner, Notification.SET, feature, oldValue, newValue, isUnsettable() && !oldIsSet); if (notifications == null) { owner.eNotify(notification); } else { notifications.add(notification); notifications.dispatch(); } } else if (notifications != null) { notifications.dispatch(); }
if (owner.eNotificationRequired()) { Notification notification = new ENotificationImpl (owner, isUnsettable() ? Notification.UNSET : Notification.SET, feature, oldValue, null); if (notifications == null) { owner.eNotify(notification); } else { notifications.add(notification); notifications.dispatch(); } } else if (notifications != null) { notifications.dispatch(); }
Clone fragments detected by clone detection tool
File path: /emf-2.4.1/src/org/eclipse/emf/ecore/impl/EStructuralFeatureImpl.java File path: /emf-2.4.1/src/org/eclipse/emf/ecore/impl/EStructuralFeatureImpl.java
Method name: void dynamicSet(InternalEObject, EStructuralFeature.Internal.DynamicValueHolder, int, Object) Method name: void dynamicUnset(InternalEObject, EStructuralFeature.Internal.DynamicValueHolder, int)
Number of AST nodes: 8 Number of AST nodes: 8
1
if (owner.eNotificationRequired())
1
if (owner.eNotificationRequired())
2
      {
2
      {
3
        Notification notification = 
3
        Notification notification = 
4
          new ENotificationImpl
4
          new ENotificationImpl
5
            (owner, 
5
            (owner, 
6
             Notification.SET, 
6
             isUnsettable() ? Notification.UNSET : Notification.SET, 
7
             feature,
7
             feature,
8
             oldValue, 
8
             oldValue, 
9
             newValue,
9
             n
10
             isUnsettable() && !oldIsSet);
10
ull);
11
        if (notifications == null)
11
        if (notifications == null)
12
        {
12
        {
13
          owner.eNotify(notification);
13
          owner.eNotify(notification);
14
        }
14
        }
15
        else
15
        else
16
        {
16
        {
17
          notifications.add(notification);
17
          notifications.add(notification);
18
          notifications.dispatch();
18
          notifications.dispatch();
19
        }
19
        }
20
      }
20
      }
21
      else if (notifications != null)
21
      else if (notifications != null)
22
      {
22
      {
23
        notifications.dispatch();
23
        notifications.dispatch();
24
      }
24
      }
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.3
Clones locationClones are declared in the same class
Number of node comparisons24
  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)2.2
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    23
    if (owner.eNotificationRequired())
    12
    if (owner.eNotificationRequired())
    24
    Notification notification = new ENotificationImpl(owner, Notification.SET, feature, oldValue, newValue, isUnsettable() && !oldIsSet);
    24
    Notification notification = new ENotificationImpl(owner, Notification.SET, feature, oldValue, newValue, isUnsettable() && !oldIsSet);
    13
    Notification notification = new ENotificationImpl(owner, isUnsettable() ? Notification.UNSET : Notification.SET, feature, oldValue, null);
    Differences
    Expression1Expression2Difference
    new ENotificationImpl(owner,Notification.SET,feature,oldValue,newValue,isUnsettable() && !oldIsSet)new ENotificationImpl(owner,isUnsettable() ? Notification.UNSET : Notification.SET,feature,oldValue,null)ARGUMENT_NUMBER_MISMATCH
    13
    Notification notification = new ENotificationImpl(owner, isUnsettable() ? Notification.UNSET : Notification.SET, feature, oldValue, null);
    25
    if (notifications == null)
    14
    if (notifications == null)
    26
    owner.eNotify(notification);
    15
    owner.eNotify(notification);
    else
    else
    27
    notifications.add(notification);
    16
    notifications.add(notification);
    28
    notifications.dispatch();
    17
    notifications.dispatch();
    29
    else if (notifications != null)
    18
    else if (notifications != null)
    30
    notifications.dispatch();
    19
    notifications.dispatch();
    Precondition Violations (0)
    Row Violation