if (isNotificationRequired()) { Entry entry = (Entry)object; EStructuralFeature feature = entry.getEStructuralFeature(); Object value = entry.getValue(); NotificationImpl notification = createNotification (Notification.SET, feature, value, value, feature.isMany() ? indexOf(feature, value) : Notification.NO_INDEX, true); if (notifications != null) { notifications.add(notification); } else { notifications = notification; } } return notifications;
if (isNotificationRequired()) { Entry entry = (Entry)object; EStructuralFeature feature = entry.getEStructuralFeature(); Object value = entry.getValue(); NotificationImpl notification = createNotification (Notification.SET, feature, value, value, feature.isMany() ? indexOf(feature, value) : Notification.NO_INDEX, true); if (notifications != null) { notifications.add(notification); } else { notifications = notification; } } return notifications;
Clone fragments detected by clone detection tool
File path: /emf-2.4.1/src/org/eclipse/emf/ecore/util/DelegatingFeatureMap.java File path: /emf-2.4.1/src/org/eclipse/emf/ecore/util/BasicFeatureMap.java
Method name: NotificationChain inverseTouch(Object, NotificationChain) Method name: NotificationChain inverseTouch(Object, NotificationChain)
Number of AST nodes: 9 Number of AST nodes: 9
1
if (isNotificationRequired())
1
if (isNotificationRequired())
2
    {
2
    {
3
      Entry entry = (Entry)object;
3
      Entry entry = (Entry)object;
4
      EStructuralFeature feature = entry.getEStructuralFeature();
4
      EStructuralFeature feature = entry.getEStructuralFeature();
5
      Object value = entry.getValue();
5
      Object value = entry.getValue();
6
      NotificationImpl notification = 
6
      NotificationImpl notification = 
7
        createNotification
7
        createNotification
8
          (Notification.SET,
8
          (Notification.SET,
9
           feature,
9
           feature,
10
           value, 
10
           value, 
11
           value,
11
           value,
12
           feature.isMany() ? indexOf(feature, value) : Notification.NO_INDEX,
12
           feature.isMany() ? indexOf(feature, value) : Notification.NO_INDEX,
13
           true);
13
           true);
14
  
14
  
15
      if (notifications != null)
15
      if (notifications != null)
16
      {
16
      {
17
        notifications.add(notification);
17
        notifications.add(notification);
18
      }
18
      }
19
      else
19
      else
20
      {
20
      {
21
        notifications = notification;
21
        notifications = notification;
22
      }
22
      }
23
    }
23
    }
24
    return notifications;
24
    return notifications;
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.2
Clones locationClones are in different classes having the same super class
Number of node comparisons35
  1. {Refactorable}
    Mapping Summary
    Number of mapped statements9
    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.9
    Clone typeType 1
    Mapped Statements
    ID Statement ID Statement
    1
    if (isNotificationRequired())
    1
    if (isNotificationRequired())
    2
    Entry entry = (Entry)object;
    2
    Entry entry = (Entry)object;
    3
    EStructuralFeature feature = entry.getEStructuralFeature();
    3
    EStructuralFeature feature = entry.getEStructuralFeature();
    4
    Object value = entry.getValue();
    4
    Object value = entry.getValue();
    5
    NotificationImpl notification = createNotification(Notification.SET, feature, value, value, feature.isMany() ? indexOf(feature, value) : Notification.NO_INDEX, true);
    5
    NotificationImpl notification = createNotification(Notification.SET, feature, value, value, feature.isMany() ? indexOf(feature, value) : Notification.NO_INDEX, true);
    6
    if (notifications != null)
    6
    if (notifications != null)
    7
    notifications.add(notification);
    7
    notifications.add(notification);
    else
    else
    8
    notifications = notification;
    8
    notifications = notification;
    9
    return notifications;
    9
    return notifications;
    Precondition Violations (0)
    Row Violation