11190-3-4

case OK: { result.append("OK"); break; } case INFO: { result.append("INFO"); break; } case WARNING: { result.append("WARNING"); break; } case ERROR: { result.append("ERROR"); break; } case CANCEL: { result.append("CANCEL"); break;
case Notification.REMOVE: { result.append("REMOVE"); break; } case Notification.REMOVE_MANY: { result.append("REMOVE_MANY"); break; } case Notification.MOVE: { result.append("MOVE"); break; } case Notification.REMOVING_ADAPTER: { result.append("REMOVING_ADAPTER"); break; } case Notification.RESOLVE: { result.append("RESOLVE"); break;

Clone fragments detected by clone detection tool
File path: /emf-2.4.1/src/org/eclipse/emf/common/util/BasicDiagnostic.java |  | File path: /emf-2.4.1/src/org/eclipse/emf/common/notify/impl/NotificationImpl.java
Method name: `String toString()` |  | Method name: `String toString()`
Number of AST nodes: 15 |  | Number of AST nodes: 15

1

    case OK: ↵

1

    case Notification.REMOVE:↵

2

          {↵

2

          {↵

3

            result.append("OK"); ↵

3

            result.append("REMOVE");↵

4

            break;↵

4

            break;↵

5

          }↵

5

          }↵

6

          case INFO: ↵

6

          case Notification.REMOVE_MANY:↵

7

          {↵

7

          {↵

8

            result.append("INFO"); ↵

8

            result.append("REMOVE_MANY");↵

9

            break;↵

9

            break;↵

10

          }↵

10

          }↵

11

          case WARNING: ↵

11

          case Notification.MOVE:↵

12

          {↵

12

          {↵

13

            result.append("WARNING"); ↵

13

            result.append("MOVE");↵

14

            break;↵

14

            break;↵

15

          }↵

15

          }↵

16

          case ERROR: ↵

16

          case Notification.REMOVING_ADAPTER:↵

17

          {↵

17

          {↵

18

            result.append("ERROR"); ↵

18

            result.append("REMOVING_ADAPTER");↵

19

            break;↵

19

            break;↵

20

          }↵

20

          }↵

21

          case CANCEL: ↵

21

          case Notification.RESOLVE:↵

22

          {↵

22

          {↵

23

            result.append("CANCEL"); ↵

23

            result.append("RESOLVE");↵

24

            break;

24

            break;

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.0
Clones location | Clones are in different classes
Number of node comparisons | 135

1. {Refactorable}

   Mapping Summary
   Number of mapped statements | 15
   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) | 0.0
   Clone type | Type 2

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

   4

       case OK:

   4 | case OK:
   16 | case Notification.REMOVE:

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   OK | Notification.REMOVE | TYPE_COMPATIBLE_REPLACEMENT

   16

       case Notification.REMOVE:

   5

       result.append("OK");

   5 | result.append("OK");
   17 | result.append("REMOVE");

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   "OK" | "REMOVE" | LITERAL_VALUE_MISMATCH
   java.lang.StringBuilder | java.lang.StringBuffer | SUBCLASS_TYPE_MISMATCH

   17

       result.append("REMOVE");

   6

       break;

   18

       break;

   7

       case INFO:

   7 | case INFO:
   19 | case Notification.REMOVE_MANY:

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   INFO | Notification.REMOVE_MANY | TYPE_COMPATIBLE_REPLACEMENT

   19

       case Notification.REMOVE_MANY:

   8

       result.append("INFO");

   8 | result.append("INFO");
   20 | result.append("REMOVE_MANY");

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   "INFO" | "REMOVE_MANY" | LITERAL_VALUE_MISMATCH
   java.lang.StringBuilder | java.lang.StringBuffer | SUBCLASS_TYPE_MISMATCH

   20

       result.append("REMOVE_MANY");

   9

       break;

   21

       break;

   10

       case WARNING:

   10 | case WARNING:
   22 | case Notification.MOVE:

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   WARNING | Notification.MOVE | TYPE_COMPATIBLE_REPLACEMENT

   22

       case Notification.MOVE:

   11

       result.append("WARNING");

   11 | result.append("WARNING");
   23 | result.append("MOVE");

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   "WARNING" | "MOVE" | LITERAL_VALUE_MISMATCH
   java.lang.StringBuilder | java.lang.StringBuffer | SUBCLASS_TYPE_MISMATCH

   23

       result.append("MOVE");

   12

       break;

   24

       break;

   13

       case ERROR:

   13 | case ERROR:
   25 | case Notification.REMOVING_ADAPTER:

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   ERROR | Notification.REMOVING_ADAPTER | TYPE_COMPATIBLE_REPLACEMENT

   25

       case Notification.REMOVING_ADAPTER:

   14

       result.append("ERROR");

   14 | result.append("ERROR");
   26 | result.append("REMOVING_ADAPTER");

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   "ERROR" | "REMOVING_ADAPTER" | LITERAL_VALUE_MISMATCH
   java.lang.StringBuilder | java.lang.StringBuffer | SUBCLASS_TYPE_MISMATCH

   26

       result.append("REMOVING_ADAPTER");

   15

       break;

   27

       break;

   16

       case CANCEL:

   16 | case CANCEL:
   28 | case Notification.RESOLVE:

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   CANCEL | Notification.RESOLVE | TYPE_COMPATIBLE_REPLACEMENT

   28

       case Notification.RESOLVE:

   17

       result.append("CANCEL");

   17 | result.append("CANCEL");
   29 | result.append("RESOLVE");

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   "CANCEL" | "RESOLVE" | LITERAL_VALUE_MISMATCH
   java.lang.StringBuilder | java.lang.StringBuffer | SUBCLASS_TYPE_MISMATCH

   29

       result.append("RESOLVE");

   18

       break;

   30

       break;

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