157-3-4

updateChildren(notification); switch (notification.getFeatureID(ResourceChange.class)) { case ChangePackage.RESOURCE_CHANGE__RESOURCE_URI: case ChangePackage.RESOURCE_CHANGE__RESOURCE: case ChangePackage.RESOURCE_CHANGE__VALUE: fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); return; case ChangePackage.RESOURCE_CHANGE__LIST_CHANGES: fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false)); return; } super.notifyChanged(notification);
updateChildren(notification); switch (notification.getFeatureID(EClassifier.class)) { case EcorePackage.ECLASSIFIER__INSTANCE_CLASS_NAME: case EcorePackage.ECLASSIFIER__DEFAULT_VALUE: case EcorePackage.ECLASSIFIER__INSTANCE_TYPE_NAME: fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); return; case EcorePackage.ECLASSIFIER__ETYPE_PARAMETERS: fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false)); return; } super.notifyChanged(notification);

Clone fragments detected by clone detection tool
File path: /emf-2.4.1/src/org/eclipse/emf/ecore/change/provider/ResourceChangeItemProvider.java |  | File path: /emf-2.4.1/src/org/eclipse/emf/ecore/provider/EClassifierItemProvider.java
Method name: `void notifyChanged(Notification)` |  | Method name: `void notifyChanged(Notification)`
Number of AST nodes: 11 |  | Number of AST nodes: 11

1

    updateChildren(notification);↵

1

    updateChildren(notification);↵

2

        switch (notification.getFeatureID(ResourceChange.class))↵

2

        switch (notification.getFeatureID(EClassifier.class))↵

3

        {↵

3

        {↵

4

          case ChangePackage.RESOURCE_CHANGE__RESOURCE_URI:↵

4

          case EcorePackage.ECLASSIFIER__INSTANCE_CLASS_NAME:↵

5

          case ChangePackage.RESOURCE_CHANGE__RESOURCE:↵

5

          case EcorePackage.ECLASSIFIER__DEFAULT_VALUE:↵

6

          case ChangePackage.RESOURCE_CHANGE__VALUE:↵

6

          case EcorePackage.ECLASSIFIER__INSTANCE_TYPE_NAME:↵

7

            fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));↵

7

            fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));↵

8

            return;↵

8

            return;↵

9

          case ChangePackage.RESOURCE_CHANGE__LIST_CHANGES:↵

9

          case EcorePackage.ECLASSIFIER__ETYPE_PARAMETERS:↵

10

            fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));↵

10

            fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));↵

11

            return;↵

11

            return;↵

12

        }↵

12

        }↵

13

        super.notifyChanged(notification);

13

        super.notifyChanged(notification);

See real code fragment |  | See real code fragment

Summary
Number of common nesting structure subtrees | 1
Number of refactorable cases | 0
Number of non-refactorable cases | 1
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.3
Clones location | Clones are in different classes having the same super class
Number of node comparisons | 5

1. {Non-refactorable}

   Mapping Summary
   Number of mapped statements | 2
   Number of unmapped statements in the first code fragment | 9
   Number of unmapped statements in the second code fragment | 9
   Time elapsed for statement mapping (ms) | 63.3
   Clone type | Type 3

   Mapped Statements
   ID | Statement |  | ID | Statement
   --- | --- | --- | --- | ---

   1

       updateChildren(notification);

   1

       updateChildren(notification);

   2

       switch (notification.getFeatureID(EClassifier.class))

   3

       case EcorePackage.ECLASSIFIER__INSTANCE_CLASS_NAME:

   4

       case EcorePackage.ECLASSIFIER__DEFAULT_VALUE:

   5

       case EcorePackage.ECLASSIFIER__INSTANCE_TYPE_NAME:

   6

       fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));

   7 | return;

   Preondition Violations
   Unmatched return;

   7

       return;

   8

       case EcorePackage.ECLASSIFIER__ETYPE_PARAMETERS:

   9

       fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));

   10 | return;

   Preondition Violations
   Unmatched return;

   10

       return;

   2

       switch (notification.getFeatureID(ResourceChange.class))

   3

       case ChangePackage.RESOURCE_CHANGE__RESOURCE_URI:

   4

       case ChangePackage.RESOURCE_CHANGE__RESOURCE:

   5

       case ChangePackage.RESOURCE_CHANGE__VALUE:

   6

       fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));

   7

       return;

   7 | return;

   Preondition Violations
   Unmatched return;

   8

       case ChangePackage.RESOURCE_CHANGE__LIST_CHANGES:

   9

       fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));

   10

       return;

   10 | return;

   Preondition Violations
   Unmatched return;

   11

       super.notifyChanged(notification);

   11 | super.notifyChanged(notification);
   11 | super.notifyChanged(notification);

   Preondition Violations
   Super method call super.notifyChanged(notification); cannot be extracted from method
   Super method call super.notifyChanged(notification); cannot be extracted from method

   11

       super.notifyChanged(notification);

   Precondition Violations (6)
   Row | Violation
   --- | ---
   1 | Unmatched return;
   2 | Unmatched return;
   3 | Unmatched return;
   4 | Unmatched return;
   5 | Super method call super.notifyChanged(notification); cannot be extracted from method
   6 | Super method call super.notifyChanged(notification); cannot be extracted from method