140-1-2

switch (eventType) { case Notification.ADD: case Notification.ADD_MANY: case Notification.REMOVE: case Notification.REMOVE_MANY: case Notification.MOVE: case Notification.UNSET: case Notification.SET: default: { refreshAbstractTreeViewer(viewer, object, eventType, feature, oldValue, newValue, index); break; } }
switch (eventType) { case Notification.ADD: case Notification.ADD_MANY: case Notification.REMOVE: case Notification.REMOVE_MANY: case Notification.MOVE: case Notification.UNSET: case Notification.SET: default: { refreshAbstractTreeViewer(viewer, object, eventType, feature, oldValue, newValue, index); break; } }

Clone fragments detected by clone detection tool
File path: /emf-2.4.1/src/org/eclipse/emf/edit/ui/provider/NotifyChangedToViewerRefresh.java |  | File path: /emf-2.4.1/src/org/eclipse/emf/edit/ui/provider/NotifyChangedToViewerRefresh.java
Method name: `void refreshTreeViewer(TreeViewer, Object, int, Object, Object, Object, int)` |  | Method name: `void refreshTableTreeViewer(org.eclipse.jface.viewers.TableTreeViewer, Object, int, Object, Object, Object, int)`
Number of AST nodes: 11 |  | Number of AST nodes: 11

1

    switch (eventType) ↵

1

    switch (eventType) ↵

2

        {↵

2

        {↵

3

          case Notification.ADD:↵

3

          case Notification.ADD:↵

4

          case Notification.ADD_MANY:↵

4

          case Notification.ADD_MANY:↵

5

          case Notification.REMOVE:↵

5

          case Notification.REMOVE:↵

6

          case Notification.REMOVE_MANY:↵

6

          case Notification.REMOVE_MANY:↵

7

          case Notification.MOVE:↵

7

          case Notification.MOVE:↵

8

          case Notification.UNSET:↵

8

          case Notification.UNSET:↵

9

          case Notification.SET:↵

9

          case Notification.SET:↵

10

          default:↵

10

          default:↵

11

          {↵

11

          {↵

12

            refreshAbstractTreeViewer(viewer, object, eventType, feature, oldValue, newValue, index);↵

12

            refreshAbstractTreeViewer(viewer, object, eventType, feature, oldValue, newValue, index);↵

13

            break;↵

13

            break;↵

14

          }↵

14

          }↵

15

        }

15

        }

See real code fragment |  | See real code fragment

Summary
Number of common nesting structure subtrees | 1
Number of refactorable cases | 1
Number of non-refactorable cases | 0
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.1
Clones location | Clones are declared in the same class
Number of node comparisons | 59

1. {Refactorable}

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

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

   1

       switch (eventType)

   1

       switch (eventType)

   2

       case Notification.ADD:

   2

       case Notification.ADD:

   3

       case Notification.ADD_MANY:

   3

       case Notification.ADD_MANY:

   4

       case Notification.REMOVE:

   4

       case Notification.REMOVE:

   5

       case Notification.REMOVE_MANY:

   5

       case Notification.REMOVE_MANY:

   6

       case Notification.MOVE:

   6

       case Notification.MOVE:

   7

       case Notification.UNSET:

   7

       case Notification.UNSET:

   8

       case Notification.SET:

   8

       case Notification.SET:

   9

       default:

   9

       default:

   10

       refreshAbstractTreeViewer(viewer, object, eventType, feature, oldValue, newValue, index);

   10 | refreshAbstractTreeViewer(viewer, object, eventType, feature, oldValue, newValue, index);
   10 | refreshAbstractTreeViewer(viewer, object, eventType, feature, oldValue, newValue, index);

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   org.eclipse.jface.viewers.TreeViewer | org.eclipse.jface.viewers.TableTreeViewer | SUBCLASS_TYPE_MISMATCH

   10

       refreshAbstractTreeViewer(viewer, object, eventType, feature, oldValue, newValue, index);

   11

       break;

   11

       break;

   Precondition Violations (0)
   Row | Violation
   --- | ---