11715-1-2

case '\b': { result.append("\\b"); break; } case '\t': { result.append("\\t"); break; } case '\n': { result.append("\\n"); break; } case '\f': { result.append("\\f"); break; } case '\r': { result.append("\\r"); break;
case '\\': { result.append("\\\\"); break; } case '\b': { result.append("\\b"); break; } case '\t': { result.append("\\t"); break; } case '\n': { result.append("\\n"); break; } case '\f': { result.append("\\f"); break;

Clone fragments detected by clone detection tool
File path: /emf-2.4.1/src/org/eclipse/emf/edit/provider/FeatureMapEntryWrapperItemProvider.java |  | File path: /emf-2.4.1/src/org/eclipse/emf/edit/provider/FeatureMapEntryWrapperItemProvider.java
Method name: `String encode(String)` |  | Method name: `String encode(String)`
Number of AST nodes: 15 |  | Number of AST nodes: 15

1

    case '\\':↵

2

            {↵

3

              result.append("\\\\");↵

4

              break;↵

5

            }↵

1

    case '\b':↵

6

            case '\b':↵

2

            {↵

7

            {↵

3

              result.append("\\b");↵

8

              result.append("\\b");↵

4

              break;↵

9

              break;↵

5

            }↵

10

            }↵

6

            case '\t':↵

11

            case '\t':↵

7

            {↵

12

            {↵

8

              result.append("\\t");↵

13

              result.append("\\t");↵

9

              break;↵

14

              break;↵

10

            }↵

15

            }↵

11

            case '\n':↵

16

            case '\n':↵

12

            {↵

17

            {↵

13

              result.append("\\n");↵

18

              result.append("\\n");↵

14

              break;↵

19

              break;↵

15

            }↵

20

            }↵

16

            case '\f':↵

21

            case '\f':↵

17

            {↵

22

            {↵

18

              result.append("\\f");↵

23

              result.append("\\f");↵

19

              break;↵

24

              break;

20

            }↵

21

            case '\r':↵

22

            {↵

23

              result.append("\\r");↵

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 the same method
Number of node comparisons | 136

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
   --- | --- | --- | --- | ---

   8

       case '\b':

   8

       case '\b':

   9

       result.append("\\b");

   9

       result.append("\\b");

   10

       break;

   10

       break;

   11

       case '\t':

   11

       case '\t':

   12

       result.append("\\t");

   12

       result.append("\\t");

   13

       break;

   13

       break;

   14

       case '\n':

   14

       case '\n':

   15

       result.append("\\n");

   15

       result.append("\\n");

   16

       break;

   16

       break;

   17

       case '\f':

   17

       case '\f':

   18

       result.append("\\f");

   18

       result.append("\\f");

   19

       break;

   19

       break;

   20

       case '\r':

   20 | case '\r':
   5 | case '\\':

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   '\r' | '\\' | LITERAL_VALUE_MISMATCH

   5

       case '\\':

   21

       result.append("\\r");

   21 | result.append("\\r");
   6 | result.append("\\\\");

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   "\\r" | "\\\\" | LITERAL_VALUE_MISMATCH

   6

       result.append("\\\\");

   22

       break;

   7

       break;

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