157-1-4

updateChildren(notification); switch (notification.getFeatureID(ListChange.class)) { case ChangePackage.LIST_CHANGE__KIND: case ChangePackage.LIST_CHANGE__INDEX: case ChangePackage.LIST_CHANGE__MOVE_TO_INDEX: case ChangePackage.LIST_CHANGE__VALUES: fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); return; case ChangePackage.LIST_CHANGE__FEATURE_MAP_ENTRY_VALUES: 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/ListChangeItemProvider.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: 12 |  | Number of AST nodes: 11

1

    updateChildren(notification);↵

1

    updateChildren(notification);↵

2

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

2

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

3

        {↵

3

        {↵

4

          case ChangePackage.LIST_CHANGE__KIND:↵

4

          case EcorePackage.ECLASSIFIER__IN↵

5

          case ChangePackage.LIST_CHANGE__INDEX:↵

5

    STANCE_CLASS_NAME:↵

6

          case ChangePackage.LIST_CHANGE__MOVE_TO_INDEX:↵

6

          case EcorePackage.ECLASSIFIER__DEFAULT_VALUE:↵

7

          case ChangePackage.LIST_CHANGE__VALUES:↵

7

          case EcorePackage.ECLASSIFIER__INSTANCE_TYPE_NAME:↵

8

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

8

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

9

            return;↵

9

            return;↵

10

          case ChangePackage.LIST_CHANGE__FEATURE_MAP_ENTRY_VALUES:↵

10

          case EcorePackage.ECLASSIFIER__ETYPE_PARAMETERS:↵

11

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

11

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

12

            return;↵

12

            return;↵

13

        }↵

13

        }↵

14

        super.notifyChanged(notification);

14

        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.2
Clones location | Clones are in different classes having the same super class
Number of node comparisons | 41

1. {Non-refactorable}

   Mapping Summary
   Number of mapped statements | 11
   Number of unmapped statements in the first code fragment | 1
   Number of unmapped statements in the second code fragment | 0
   Time elapsed for statement mapping (ms) | 2.6
   Clone type | Type 3

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

   1

       updateChildren(notification);

   1

       updateChildren(notification);

   2

       switch (notification.getFeatureID(ListChange.class))

   2

       switch (notification.getFeatureID(EClassifier.class))

   3

       case ChangePackage.LIST_CHANGE__KIND:

   3 | case ChangePackage.LIST_CHANGE__KIND:
   3 | case EcorePackage.ECLASSIFIER__INSTANCE_CLASS_NAME:

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   org.eclipse.emf.ecore.change.ChangePackage | org.eclipse.emf.ecore.EcorePackage | VARIABLE_TYPE_MISMATCH
   LIST_CHANGE__KIND | ECLASSIFIER__INSTANCE_CLASS_NAME | VARIABLE_NAME_MISMATCH

   Preondition Violations

   Type org.eclipse.emf.ecore.change.ChangePackage of variable ChangePackage does not match with type org.eclipse.emf.ecore.EcorePackage of variable EcorePackage
   - Make classes org.eclipse.emf.ecore.change.ChangePackage and org.eclipse.emf.ecore.EcorePackage extend a common superclass

   3

       case EcorePackage.ECLASSIFIER__INSTANCE_CLASS_NAME:

   4

       case ChangePackage.LIST_CHANGE__INDEX:

   4 | case ChangePackage.LIST_CHANGE__INDEX:
   4 | case EcorePackage.ECLASSIFIER__DEFAULT_VALUE:

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   org.eclipse.emf.ecore.change.ChangePackage | org.eclipse.emf.ecore.EcorePackage | VARIABLE_TYPE_MISMATCH
   LIST_CHANGE__INDEX | ECLASSIFIER__DEFAULT_VALUE | VARIABLE_NAME_MISMATCH

   Preondition Violations

   Type org.eclipse.emf.ecore.change.ChangePackage of variable ChangePackage does not match with type org.eclipse.emf.ecore.EcorePackage of variable EcorePackage
   - Make classes org.eclipse.emf.ecore.change.ChangePackage and org.eclipse.emf.ecore.EcorePackage extend a common superclass

   4

       case EcorePackage.ECLASSIFIER__DEFAULT_VALUE:

   5

       case ChangePackage.LIST_CHANGE__MOVE_TO_INDEX:

   5 | case ChangePackage.LIST_CHANGE__MOVE_TO_INDEX:
   5 | case EcorePackage.ECLASSIFIER__INSTANCE_TYPE_NAME:

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   org.eclipse.emf.ecore.change.ChangePackage | org.eclipse.emf.ecore.EcorePackage | VARIABLE_TYPE_MISMATCH
   LIST_CHANGE__MOVE_TO_INDEX | ECLASSIFIER__INSTANCE_TYPE_NAME | VARIABLE_NAME_MISMATCH

   Preondition Violations

   Type org.eclipse.emf.ecore.change.ChangePackage of variable ChangePackage does not match with type org.eclipse.emf.ecore.EcorePackage of variable EcorePackage
   - Make classes org.eclipse.emf.ecore.change.ChangePackage and org.eclipse.emf.ecore.EcorePackage extend a common superclass

   5

       case EcorePackage.ECLASSIFIER__INSTANCE_TYPE_NAME:

   6

       case ChangePackage.LIST_CHANGE__VALUES:

   6 | case ChangePackage.LIST_CHANGE__VALUES:
   8 | case EcorePackage.ECLASSIFIER__ETYPE_PARAMETERS:

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   org.eclipse.emf.ecore.change.ChangePackage | org.eclipse.emf.ecore.EcorePackage | VARIABLE_TYPE_MISMATCH
   LIST_CHANGE__VALUES | ECLASSIFIER__ETYPE_PARAMETERS | VARIABLE_NAME_MISMATCH

   Preondition Violations

   Type org.eclipse.emf.ecore.change.ChangePackage of variable ChangePackage does not match with type org.eclipse.emf.ecore.EcorePackage of variable EcorePackage
   - Make classes org.eclipse.emf.ecore.change.ChangePackage and org.eclipse.emf.ecore.EcorePackage extend a common superclass

   8

       case EcorePackage.ECLASSIFIER__ETYPE_PARAMETERS:

   7

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

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

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   false | true | LITERAL_VALUE_MISMATCH
   true | false | LITERAL_VALUE_MISMATCH

   9

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

   8

       return;

   10

       return;

   9

       case ChangePackage.LIST_CHANGE__FEATURE_MAP_ENTRY_VALUES:

   10

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

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

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   true | false | LITERAL_VALUE_MISMATCH
   false | true | LITERAL_VALUE_MISMATCH

   6

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

   11

       return;

   7

       return;

   12

       super.notifyChanged(notification);

   11

       super.notifyChanged(notification);

   Precondition Violations (4)
   Row | Violation
   --- | ---
   1 | Type org.eclipse.emf.ecore.change.ChangePackage of variable ChangePackage does not match with type org.eclipse.emf.ecore.EcorePackage of variable EcorePackage
   2 | Type org.eclipse.emf.ecore.change.ChangePackage of variable ChangePackage does not match with type org.eclipse.emf.ecore.EcorePackage of variable EcorePackage
   3 | Type org.eclipse.emf.ecore.change.ChangePackage of variable ChangePackage does not match with type org.eclipse.emf.ecore.EcorePackage of variable EcorePackage
   4 | Type org.eclipse.emf.ecore.change.ChangePackage of variable ChangePackage does not match with type org.eclipse.emf.ecore.EcorePackage of variable EcorePackage