1713-1-2

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; }
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/DelegatingFeatureMap.java |  | File path: /emf-2.4.1/src/org/eclipse/emf/ecore/util/BasicFeatureMap.java
Method name: `` |  | Method name: ``
Number of AST nodes: 0 |  | Number of AST nodes: 0

1

    NotificationChain shadowSet(Entry oldObject, Entry newObject, NotificationChain notifications)↵

1

    NotificationChain shadowSet(Entry oldObject, Entry newObject, NotificationChain notifications)↵

2

      {↵

2

      {↵

3

        if (isNotificationRequired())↵

3

        if (isNotificationRequired())↵

4

        {↵

4

        {↵

5

          EStructuralFeature feature = oldObject.getEStructuralFeature();↵

5

          EStructuralFeature feature = oldObject.getEStructuralFeature();↵

6

          Object oldValue = oldObject.getValue();↵

6

          Object oldValue = oldObject.getValue();↵

7

          Object newValue = newObject.getValue();↵

7

          Object newValue = newObject.getValue();↵

8

          NotificationImpl notification = ↵

8

          NotificationImpl notification = ↵

9

            createNotification↵

9

            createNotification↵

10

              (Notification.SET,↵

10

              (Notification.SET,↵

11

               feature,↵

11

               feature,↵

12

               oldValue,↵

12

               oldValue,↵

13

               newValue,↵

13

               newValue,↵

14

               feature.isMany() ? indexOf(feature, newValue) : Notification.NO_INDEX,↵

14

               feature.isMany() ? indexOf(feature, newValue) : Notification.NO_INDEX,↵

15

               true);↵

15

               true);↵

16

          if (notifications != null)↵

16

          if (notifications != null)↵

17

          {↵

17

          {↵

18

            notifications.add(notification);↵

18

            notifications.add(notification);↵

19

          }↵

19

          }↵

20

          else↵

20

          else↵

21

          {↵

21

          {↵

22

            notifications = notification;↵

22

            notifications = notification;↵

23

          }↵

23

          }↵

24

        }↵

24

        }↵

25

        return notifications;↵

25

        return notifications;↵

26

      }↵

26

      }↵

27

      public NotificationChain inverseTouch(Object object, NotificationChain notifications)↵

27

      public NotificationChain inverseTouch(Object object, NotificationChain notifications)↵

28

      {↵

28

      {↵

29

        if (isNotificationRequired())↵

29

        if (isNotificationRequired())↵

30

        {↵

30

        {↵

31

          Entry entry = (Entry)object;↵

31

          Entry entry = (Entry)object;↵

32

          EStructuralFeature feature = entry.getEStructuralFeature();↵

32

          EStructuralFeature feature = entry.getEStructuralFeature();↵

33

          Object value = entry.getValue();↵

33

          Object value = entry.getValue();↵

34

          NotificationImpl notification = ↵

34

          NotificationImpl notification = ↵

35

            createNotification↵

35

            createNotification↵

36

              (Notification.SET,↵

36

              (Notification.SET,↵

37

               feature,↵

37

               feature,↵

38

               value, ↵

38

               value, ↵

39

               value,↵

39

               value,↵

40

               feature.isMany() ? indexOf(feature, value) : Notification.NO_INDEX,↵

40

               feature.isMany() ? indexOf(feature, value) : Notification.NO_INDEX,↵

41

               true);↵

41

               true);↵

42

      ↵

42

      ↵

43

          if (notifications != null)↵

43

          if (notifications != null)↵

44

          {↵

44

          {↵

45

            notifications.add(notification);↵

45

            notifications.add(notification);↵

46

          }↵

46

          }↵

47

          else↵

47

          else↵

48

          {↵

48

          {↵

49

            notifications = notification;↵

49

            notifications = notification;↵

50

          }↵

50

          }↵

51

        }↵

51

        }↵

52

        return notifications;↵

52

        return notifications;↵

53

      }

53

      }

See real code fragment |  | See real code fragment

Summary
Number of common nesting structure subtrees | 0
Number of refactorable cases | 0
Number of non-refactorable cases | 0
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.0
Clones location |
Number of node comparisons | 0