10946-1-2

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(',');
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');

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: 8 |  | Number of AST nodes: 8

1

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

1

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

2

                sb.append('u');↵

2

                sb.append('F');↵

3

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

3

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

4

                sb.append('w');↵

4

                sb.append('H');↵

5

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

5

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

6

                sb.append('x');↵

6

                sb.append('X');↵

7

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

7

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

8

                sb.append(',');

8

                sb.append('i');

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

1. {Refactorable}

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

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

   14

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

   14 | if ((options & RegularExpression.USE_UNICODE_CATEGORY) != 0)
   8 | if ((options & RegularExpression.IGNORE_CASE) != 0)

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

   8

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

   15

       sb.append('u');

   15 | sb.append('u');
   9 | sb.append('i');

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

   9

       sb.append('i');

   16

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

   16 | if ((options & RegularExpression.UNICODE_WORD_BOUNDARY) != 0)
   6 | if ((options & RegularExpression.XMLSCHEMA_MODE) != 0)

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

   6

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

   17

       sb.append('w');

   17 | sb.append('w');
   7 | sb.append('X');

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

   7

       sb.append('X');

   18

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

   18 | if ((options & RegularExpression.EXTENDED_COMMENT) != 0)
   4 | if ((options & RegularExpression.PROHIBIT_HEAD_CHARACTER_OPTIMIZATION) != 0)

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

   4

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

   19

       sb.append('x');

   19 | sb.append('x');
   5 | sb.append('H');

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

   5

       sb.append('H');

   20

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

   20 | if ((options & RegularExpression.SPECIAL_COMMA) != 0)
   2 | if ((options & RegularExpression.PROHIBIT_FIXED_STRING_OPTIMIZATION) != 0)

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

   2

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

   21

       sb.append(',');

   21 | sb.append(',');
   3 | sb.append('F');

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

   3

       sb.append('F');

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