@Override public NotificationChain shadowSet(Entry oldObject, Entry newObject, NotificationChain notifications) { if (isNotificationRequired()) { EStructuralFeature feature = oldObject.getEStructuralFeature(); Object oldValue = oldObject.getValue(); Object newValue = newObject.getValue(); NotificationImpl notification = createNotification (Notification.SET, feature, oldValue, newValue, feature.isMany() ? indexOf(feature, newValue) : Notification.NO_INDEX, true); if (notifications != null) { notifications.add(notification); } else { notifications = notification; } } return notifications; } public NotificationChain inverseTouch(Object object, NotificationChain 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;
@Override public NotificationChain shadowSet(Entry oldObject, Entry newObject, NotificationChain notifications) { if (isNotificationRequired()) { EStructuralFeature feature = oldObject.getEStructuralFeature(); Object oldValue = oldObject.getValue(); Object newValue = newObject.getValue(); NotificationImpl notification = createNotification (Notification.SET, feature, oldValue, newValue, feature.isMany() ? indexOf(feature, newValue) : Notification.NO_INDEX, true); if (notifications != null) { notifications.add(notification); } else { notifications = notification; } } return notifications; } public NotificationChain inverseTouch(Object object, NotificationChain 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/BasicFeatureMap.java File path: /emf-2.4.1/src/org/eclipse/emf/ecore/util/DelegatingFeatureMap.java
Method name: Method name:
Number of AST nodes: 0 Number of AST nodes: 0
1
@Override
1
@Override
2
  public NotificationChain shadowSet(Entry oldObject, Entry newObject, NotificationChain notifications)
2
  public NotificationChain shadowSet(Entry oldObject, Entry newObject, NotificationChain notifications)
3
  {
3
  {
4
    if (isNotificationRequired())
4
    if (isNotificationRequired())
5
    {
5
    {
6
      EStructuralFeature feature = oldObject.getEStructuralFeature();
6
      EStructuralFeature feature = oldObject.getEStructuralFeature();
7
      Object oldValue = oldObject.getValue();
7
      Object oldValue = oldObject.getValue();
8
      Object newValue = newObject.getValue();
8
      Object newValue = newObject.getValue();
9
      NotificationImpl notification = 
9
      NotificationImpl notification = 
10
        createNotification
10
        createNotification
11
          (Notification.SET,
11
          (Notification.SET,
12
           feature,
12
           feature,
13
           oldValue,
13
           oldValue,
14
           newValue,
14
           newValue,
15
           feature.isMany() ? indexOf(feature, newValue) : Notification.NO_INDEX,
15
           feature.isMany() ? indexOf(feature, newValue) : Notification.NO_INDEX,
16
           true);
16
           true);
17
      if (notifications != null)
17
      if (notifications != null)
18
      {
18
      {
19
        notifications.add(notification);
19
        notifications.add(notification);
20
      }
20
      }
21
      else
21
      else
22
      {
22
      {
23
        notifications = notification;
23
        notifications = notification;
24
      }
24
      }
25
    }
25
    }
26
    return notifications;
26
    return notifications;
27
  }
27
  }
28
  public NotificationChain inverseTouch(Object object, NotificationChain notifications)
28
  public NotificationChain inverseTouch(Object object, NotificationChain notifications)
29
  {
29
  {
30
    if (isNotificationRequired())
30
    if (isNotificationRequired())
31
    {
31
    {
32
      Entry entry = (Entry)object;
32
      Entry entry = (Entry)object;
33
      EStructuralFeature feature = entry.getEStructuralFeature();
33
      EStructuralFeature feature = entry.getEStructuralFeature();
34
      Object value = entry.getValue();
34
      Object value = entry.getValue();
35
      NotificationImpl notification = 
35
      NotificationImpl notification = 
36
        createNotification
36
        createNotification
37
          (Notification.SET,
37
          (Notification.SET,
38
           feature,
38
           feature,
39
           value, 
39
           value, 
40
           value,
40
           value,
41
           feature.isMany() ? indexOf(feature, value) : Notification.NO_INDEX,
41
           feature.isMany() ? indexOf(feature, value) : Notification.NO_INDEX,
42
           true);
42
           true);
43
  
43
  
44
      if (notifications != null)
44
      if (notifications != null)
45
      {
45
      {
46
        notifications.add(notification);
46
        notifications.add(notification);
47
      }
47
      }
48
      else
48
      else
49
      {
49
      {
50
        notifications = notification;
50
        notifications = notification;
51
      }
51
      }
52
    }
52
    }
53
    return notifications;
53
    return notifications;
Summary
Number of common nesting structure subtrees0
Number of refactorable cases0
Number of non-refactorable cases0
Time elapsed for finding largest common nesting structure subtrees (ms)0.0
Clones location
Number of node comparisons0