10950-1-2

if ((options & RegularExpression.PROHIBIT_FIXED_STRING_OPTIMIZATION) != 0) sb.append('F'); if ((options & RegularExpression.PROHIBIT_HEAD_CHARACTER_OPTIMIZATION) != 0) sb.append('H'); if ((options & RegularExpression.XMLSCHEMA_MODE) != 0) sb.append('X'); if ((options & RegularExpression.IGNORE_CASE) != 0) sb.append('i'); if ((options & RegularExpression.MULTIPLE_LINES) != 0) sb.append('m'); if ((options & RegularExpression.SINGLE_LINE) != 0) sb.append('s'); if ((options & RegularExpression.USE_UNICODE_CATEGORY) != 0) sb.append('u'); if ((options & RegularExpression.UNICODE_WORD_BOUNDARY) != 0) sb.append('w');
if ((options & RegularExpression.XMLSCHEMA_MODE) != 0) sb.append('X'); if ((options & RegularExpression.IGNORE_CASE) != 0) sb.append('i'); if ((options & RegularExpression.MULTIPLE_LINES) != 0) sb.append('m'); if ((options & RegularExpression.SINGLE_LINE) != 0) sb.append('s'); if ((options & RegularExpression.USE_UNICODE_CATEGORY) != 0) sb.append('u'); if ((options & RegularExpression.UNICODE_WORD_BOUNDARY) != 0) sb.append('w'); if ((options & RegularExpression.EXTENDED_COMMENT) != 0) sb.append('x'); if ((options & RegularExpression.SPECIAL_COMMA) != 0) sb.append(',');

Clone fragments detected by clone detection tool
File path: /emf-2.4.1/src/org/eclipse/emf/ecore/xml/type/internal/RegEx.java |  | File path: /emf-2.4.1/src/org/eclipse/emf/ecore/xml/type/internal/RegEx.java
Method name: `String createOptionString(int)` |  | Method name: `String createOptionString(int)`
Number of AST nodes: 16 |  | Number of AST nodes: 16

1

    if ((options & RegularExpression.PROHIBIT_FIXED_STRING_OPTIMIZATION) != 0)↵

2

                sb.append('F');↵

3

            if ((options & RegularExpression.PROHIBIT_HEAD_CHARACTER_OPTIMIZATION) != 0)↵

4

                sb.append('H');↵

5

            if ((options & RegularExpression.XMLSCHEMA_MODE) != 0)↵

1

    if ((options & RegularExpression.XMLSCHEMA_MODE) != 0)↵

6

                sb.append('X');↵

2

                sb.append('X');↵

7

            if ((options & RegularExpression.IGNORE_CASE) != 0)↵

3

            if ((options & RegularExpression.IGNORE_CASE) != 0)↵

8

                sb.append('i');↵

4

                sb.append('i');↵

9

            if ((options & RegularExpression.MULTIPLE_LINES) != 0)↵

5

            if ((options & RegularExpression.MULTIPLE_LINES) != 0)↵

10

                sb.append('m');↵

6

                sb.append('m');↵

11

            if ((options & RegularExpression.SINGLE_LINE) != 0)↵

7

            if ((options & RegularExpression.SINGLE_LINE) != 0)↵

12

                sb.append('s');↵

8

                sb.append('s');↵

13

            if ((options & RegularExpression.USE_UNICODE_CATEGORY) != 0)↵

9

            if ((options & RegularExpression.USE_UNICODE_CATEGORY) != 0)↵

14

                sb.append('u');↵

10

                sb.append('u');↵

15

            if ((options & RegularExpression.UNICODE_WORD_BOUNDARY) != 0)↵

11

            if ((options & RegularExpression.UNICODE_WORD_BOUNDARY) != 0)↵

16

                sb.append('w');

12

                sb.append('w');↵

13

            if ((options & RegularExpression.EXTENDED_COMMENT) != 0)↵

14

                sb.append('x');↵

15

            if ((options & RegularExpression.SPECIAL_COMMA) != 0)↵

16

                sb.append(',');

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) | 5.9
Clones location | Clones are in the same method
Number of node comparisons | 172

1. {Refactorable}

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

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

   2

       if ((options & RegularExpression.PROHIBIT_FIXED_STRING_OPTIMIZATION) != 0)

   2 | if ((options & RegularExpression.PROHIBIT_FIXED_STRING_OPTIMIZATION) != 0)
   6 | if ((options & RegularExpression.XMLSCHEMA_MODE) != 0)

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   PROHIBIT_FIXED_STRING_OPTIMIZATION | XMLSCHEMA_MODE | VARIABLE_NAME_MISMATCH

   6

       if ((options & RegularExpression.XMLSCHEMA_MODE) != 0)

   3

       sb.append('F');

   3 | sb.append('F');
   7 | sb.append('X');

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   'F' | 'X' | LITERAL_VALUE_MISMATCH

   7

       sb.append('X');

   4

       if ((options & RegularExpression.PROHIBIT_HEAD_CHARACTER_OPTIMIZATION) != 0)

   4 | if ((options & RegularExpression.PROHIBIT_HEAD_CHARACTER_OPTIMIZATION) != 0)
   8 | if ((options & RegularExpression.IGNORE_CASE) != 0)

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   PROHIBIT_HEAD_CHARACTER_OPTIMIZATION | IGNORE_CASE | VARIABLE_NAME_MISMATCH

   8

       if ((options & RegularExpression.IGNORE_CASE) != 0)

   5

       sb.append('H');

   5 | sb.append('H');
   9 | sb.append('i');

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   'H' | 'i' | LITERAL_VALUE_MISMATCH

   9

       sb.append('i');

   6

       if ((options & RegularExpression.XMLSCHEMA_MODE) != 0)

   6 | if ((options & RegularExpression.XMLSCHEMA_MODE) != 0)
   10 | if ((options & RegularExpression.MULTIPLE_LINES) != 0)

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   XMLSCHEMA_MODE | MULTIPLE_LINES | VARIABLE_NAME_MISMATCH

   10

       if ((options & RegularExpression.MULTIPLE_LINES) != 0)

   7

       sb.append('X');

   7 | sb.append('X');
   11 | sb.append('m');

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   'X' | 'm' | LITERAL_VALUE_MISMATCH

   11

       sb.append('m');

   8

       if ((options & RegularExpression.IGNORE_CASE) != 0)

   8 | if ((options & RegularExpression.IGNORE_CASE) != 0)
   12 | if ((options & RegularExpression.SINGLE_LINE) != 0)

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   IGNORE_CASE | SINGLE_LINE | VARIABLE_NAME_MISMATCH

   12

       if ((options & RegularExpression.SINGLE_LINE) != 0)

   9

       sb.append('i');

   9 | sb.append('i');
   13 | sb.append('s');

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   'i' | 's' | LITERAL_VALUE_MISMATCH

   13

       sb.append('s');

   10

       if ((options & RegularExpression.MULTIPLE_LINES) != 0)

   10 | if ((options & RegularExpression.MULTIPLE_LINES) != 0)
   14 | if ((options & RegularExpression.USE_UNICODE_CATEGORY) != 0)

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   MULTIPLE_LINES | USE_UNICODE_CATEGORY | VARIABLE_NAME_MISMATCH

   14

       if ((options & RegularExpression.USE_UNICODE_CATEGORY) != 0)

   11

       sb.append('m');

   11 | sb.append('m');
   15 | sb.append('u');

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   'm' | 'u' | LITERAL_VALUE_MISMATCH

   15

       sb.append('u');

   12

       if ((options & RegularExpression.SINGLE_LINE) != 0)

   12 | if ((options & RegularExpression.SINGLE_LINE) != 0)
   16 | if ((options & RegularExpression.UNICODE_WORD_BOUNDARY) != 0)

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   SINGLE_LINE | UNICODE_WORD_BOUNDARY | VARIABLE_NAME_MISMATCH

   16

       if ((options & RegularExpression.UNICODE_WORD_BOUNDARY) != 0)

   13

       sb.append('s');

   13 | sb.append('s');
   17 | sb.append('w');

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   's' | 'w' | LITERAL_VALUE_MISMATCH

   17

       sb.append('w');

   14

       if ((options & RegularExpression.USE_UNICODE_CATEGORY) != 0)

   14 | if ((options & RegularExpression.USE_UNICODE_CATEGORY) != 0)
   18 | if ((options & RegularExpression.EXTENDED_COMMENT) != 0)

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   USE_UNICODE_CATEGORY | EXTENDED_COMMENT | VARIABLE_NAME_MISMATCH

   18

       if ((options & RegularExpression.EXTENDED_COMMENT) != 0)

   15

       sb.append('u');

   15 | sb.append('u');
   19 | sb.append('x');

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   'u' | 'x' | LITERAL_VALUE_MISMATCH

   19

       sb.append('x');

   16

       if ((options & RegularExpression.UNICODE_WORD_BOUNDARY) != 0)

   16 | if ((options & RegularExpression.UNICODE_WORD_BOUNDARY) != 0)
   20 | if ((options & RegularExpression.SPECIAL_COMMA) != 0)

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   UNICODE_WORD_BOUNDARY | SPECIAL_COMMA | VARIABLE_NAME_MISMATCH

   20

       if ((options & RegularExpression.SPECIAL_COMMA) != 0)

   17

       sb.append('w');

   17 | sb.append('w');
   21 | sb.append(',');

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   'w' | ',' | LITERAL_VALUE_MISMATCH

   21

       sb.append(',');

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