if (isNotificationRequired()) { NotificationImpl notification = feature.isMany() ? createNotification (Notification.REMOVE, feature, object, null, count, true) : createNotification (feature.isUnsettable() ? Notification.UNSET : Notification.SET, feature, object, feature.getDefaultValue(), Notification.NO_INDEX, true); if (notifications != null) { notifications.add(notification); } else { notifications = notification; } } notifications = basicRemove(match, notifications);
if (isNotificationRequired()) { NotificationImpl notification = feature.isMany() ? createNotification (Notification.REMOVE, feature, object, null, count, true) : createNotification (feature.isUnsettable() ? Notification.UNSET : Notification.SET, feature, object, feature.getDefaultValue(), Notification.NO_INDEX, true); if (notifications != null) { notifications.add(notification); } else { notifications = notification; } } notifications = basicRemove(match, notifications);
Clone fragments detected by clone detection tool
File path: /emf-2.4.1/src/org/eclipse/emf/ecore/util/BasicFeatureMap.java File path: /emf-2.4.1/src/org/eclipse/emf/ecore/util/DelegatingFeatureMap.java
Method name: NotificationChain basicRemove(EStructuralFeature, Object, NotificationChain) Method name: NotificationChain basicRemove(EStructuralFeature, Object, NotificationChain)
Number of AST nodes: 6 Number of AST nodes: 6
1
if (isNotificationRequired())
1
if (isNotificationRequired())
2
      {
2
      {
3
        NotificationImpl notification = 
3
        NotificationImpl notification = 
4
          feature.isMany() ?
4
          feature.isMany() ?
5
            createNotification
5
            createNotification
6
              (Notification.REMOVE,
6
              (Notification.REMOVE,
7
               feature,
7
               feature,
8
               object,
8
               object,
9
               null, 
9
               null, 
10
               count,
10
               count,
11
               true) :
11
               true) :
12
            createNotification
12
            createNotification
13
              (feature.isUnsettable() ? Notification.UNSET : Notification.SET, 
13
              (feature.isUnsettable() ? Notification.UNSET : Notification.SET, 
14
               feature,
14
               feature,
15
               object,
15
               object,
16
               feature.getDefaultValue(), 
16
               feature.getDefaultValue(), 
17
               Notification.NO_INDEX,
17
               Notification.NO_INDEX,
18
               true);
18
               true);
19
  
19
  
20
        if (notifications != null)
20
        if (notifications != null)
21
        {
21
        {
22
          notifications.add(notification);
22
          notifications.add(notification);
23
        }
23
        }
24
        else
24
        else
25
        {
25
        {
26
          notifications = notification;
26
          notifications = notification;
27
        }
27
        }
28
      }
28
      }
29
      notifications = basicRemove(match, notifications);
29
      notifications = basicRemove(match, 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 comparisons24
  1. {Refactorable}
    Mapping Summary
    Number of mapped statements6
    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.9
    Clone typeType 1
    Mapped Statements
    ID Statement ID Statement
    29
    if (isNotificationRequired())
    28
    if (isNotificationRequired())
    30
    NotificationImpl notification = feature.isMany() ? createNotification(Notification.REMOVE, feature, object, null, count, true) : createNotification(feature.isUnsettable() ? Notification.UNSET : Notification.SET, feature, object, feature.getDefaultValue(), Notification.NO_INDEX, true);
    29
    NotificationImpl notification = feature.isMany() ? createNotification(Notification.REMOVE, feature, object, null, count, true) : createNotification(feature.isUnsettable() ? Notification.UNSET : Notification.SET, feature, object, feature.getDefaultValue(), Notification.NO_INDEX, true);
    31
    if (notifications != null)
    30
    if (notifications != null)
    32
    notifications.add(notification);
    31
    notifications.add(notification);
    else
    else
    33
    notifications = notification;
    32
    notifications = notification;
    34
    notifications = basicRemove(match, notifications);
    33
    notifications = basicRemove(match, notifications);
    Precondition Violations (0)
    Row Violation