if (this.fixedStringOnly) { //System.err.println("DEBUG: fixed-only: "+this.fixedString); int o = this.fixedStringTable.matches(target, con.start, con.limit); if (o >= 0) { if (con.match != null) { con.match.setBeginning(0, o); con.match.setEnd(0, o+this.fixedString.length()); } con.inuse = false; return true; } con.inuse = false; return false; } /* * The pattern contains a fixed string. * The engine checks with Boyer-Moore whether the text contains the fixed string or not. * If not, it return with false. */ if (this.fixedString != null) { int o = this.fixedStringTable.matches(target, con.start, con.limit); if (o < 0) { //System.err.println("Non-match in fixed-string search."); con.inuse = false; return false; } } int limit = con.limit-this.minlength; int matchStart; int matchEnd = -1; /* * Checks whether the expression starts with ".*". */ if (this.operations != null && this.operations.type == Op.CLOSURE && this.operations.getChild().type == Op.DOT) { if (isSet(this.options, SINGLE_LINE)) { matchStart = con.start; matchEnd = this. matchCharArray (con, this.operations, con.start, 1, this.options); } else { boolean previousIsEOL = true; for (matchStart = con.start; matchStart <= limit; matchStart ++) { int ch = target [ matchStart ] ; if (isEOLChar(ch)) { previousIsEOL = true; } else { if (previousIsEOL) { if (0 <= (matchEnd = this. matchCharArray (con, this.operations, matchStart, 1, this.options))) break; } previousIsEOL = false; } } } } /* * Optimization against the first character. */ else if (this.firstChar != null) { //System.err.println("DEBUG: with firstchar-matching: "+this.firstChar); RangeToken range = this.firstChar; if (RegularExpression.isSet(this.options, IGNORE_CASE)) { range = this.firstChar.getCaseInsensitiveToken(); for (matchStart = con.start; matchStart <= limit; matchStart ++) { int ch = target [ matchStart ] ; if (REUtil.isHighSurrogate(ch) && matchStart+1 < con.limit) { ch = REUtil.composeFromSurrogates(ch, target [ matchStart+1 ] ); if (!range.match(ch)) continue; } else { if (!range.match(ch)) { char ch1 = Character.toUpperCase((char)ch); if (!range.match(ch1)) if (!range.match(Character.toLowerCase(ch1))) continue; } } if (0 <= (matchEnd = this. matchCharArray (con, this.operations, matchStart, 1, this.options))) break; } } else { for (matchStart = con.start; matchStart <= limit; matchStart ++) { int ch = target [ matchStart ] ; if (REUtil.isHighSurrogate(ch) && matchStart+1 < con.limit) ch = REUtil.composeFromSurrogates(ch, target [ matchStart+1 ] ); if (!range.match(ch)) continue; if (0 <= (matchEnd = this. matchCharArray (con, this.operations, matchStart, 1, this.options))) break; } } } /* * Straightforward matching. */ else { for (matchStart = con.start; matchStart <= limit; matchStart ++) { if (0 <= (matchEnd = this. matchCharArray (con, this.operations, matchStart, 1, this.options))) break; } } if (matchEnd >= 0) { if (con.match != null) { con.match.setBeginning(0, matchStart); con.match.setEnd(0, matchEnd); } con.inuse = false; return true; } else { con.inuse = false; return false; }
if (this.fixedStringOnly) { //System.err.println("DEBUG: fixed-only: "+this.fixedString); int o = this.fixedStringTable.matches(target, con.start, con.limit); if (o >= 0) { if (con.match != null) { con.match.setBeginning(0, o); con.match.setEnd(0, o+this.fixedString.length()); } con.inuse = false; return true; } con.inuse = false; return false; } /* * The pattern contains a fixed string. * The engine checks with Boyer-Moore whether the text contains the fixed string or not. * If not, it return with false. */ if (this.fixedString != null) { int o = this.fixedStringTable.matches(target, con.start, con.limit); if (o < 0) { //System.err.println("Non-match in fixed-string search."); con.inuse = false; return false; } } int limit = con.limit-this.minlength; int matchStart; int matchEnd = -1; /* * Checks whether the expression starts with ".*". */ if (this.operations != null && this.operations.type == Op.CLOSURE && this.operations.getChild().type == Op.DOT) { if (isSet(this.options, SINGLE_LINE)) { matchStart = con.start; matchEnd = this. matchCharacterIterator (con, this.operations, con.start, 1, this.options); } else { boolean previousIsEOL = true; for (matchStart = con.start; matchStart <= limit; matchStart ++) { int ch = target .setIndex( matchStart ) ; if (isEOLChar(ch)) { previousIsEOL = true; } else { if (previousIsEOL) { if (0 <= (matchEnd = this. matchCharacterIterator (con, this.operations, matchStart, 1, this.options))) break; } previousIsEOL = false; } } } } /* * Optimization against the first character. */ else if (this.firstChar != null) { //System.err.println("DEBUG: with firstchar-matching: "+this.firstChar); RangeToken range = this.firstChar; if (RegularExpression.isSet(this.options, IGNORE_CASE)) { range = this.firstChar.getCaseInsensitiveToken(); for (matchStart = con.start; matchStart <= limit; matchStart ++) { int ch = target .setIndex( matchStart ) ; if (REUtil.isHighSurrogate(ch) && matchStart+1 < con.limit) { ch = REUtil.composeFromSurrogates(ch, target .setIndex( matchStart+1 ) ); if (!range.match(ch)) continue; } else { if (!range.match(ch)) { char ch1 = Character.toUpperCase((char)ch); if (!range.match(ch1)) if (!range.match(Character.toLowerCase(ch1))) continue; } } if (0 <= (matchEnd = this. matchCharacterIterator (con, this.operations, matchStart, 1, this.options))) break; } } else { for (matchStart = con.start; matchStart <= limit; matchStart ++) { int ch = target .setIndex( matchStart ) ; if (REUtil.isHighSurrogate(ch) && matchStart+1 < con.limit) ch = REUtil.composeFromSurrogates(ch, target .setIndex( matchStart+1 ) ); if (!range.match(ch)) continue; if (0 <= (matchEnd = this. matchCharacterIterator (con, this.operations, matchStart, 1, this.options))) break; } } } /* * Straightforward matching. */ else { for (matchStart = con.start; matchStart <= limit; matchStart ++) { if (0 <= (matchEnd = this. matchCharacterIterator (con, this.operations, matchStart, 1, this.options))) break; } } if (matchEnd >= 0) { if (con.match != null) { con.match.setBeginning(0, matchStart); con.match.setEnd(0, matchEnd); } con.inuse = false; return true; } else { con.inuse = false; return false; }
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: boolean matches(char[], int, int, Match) Method name: boolean matches(CharacterIterator, Match)
Number of AST nodes: 67 Number of AST nodes: 67
1
if (this.fixedStringOnly) {
1
if (this.fixedStringOnly) {
2
              //System.err.println("DEBUG: fixed-only: "+this.fixedString);
2
              //System.err.println("DEBUG: fixed-only: "+this.fixedString);
3
              int o = this.fixedStringTable.matches(target, con.start, con.limit);
3
              int o = this.fixedStringTable.matches(target, con.start, con.limit);
4
              if (o >= 0) {
4
              if (o >= 0) {
5
                  if (con.match != null) {
5
                  if (con.match != null) {
6
                      con.match.setBeginning(0, o);
6
                      con.match.setBeginning(0, o);
7
                      con.match.setEnd(0, o+this.fixedString.length());
7
                      con.match.setEnd(0, o+this.fixedString.length());
8
                  }
8
                  }
9
                  con.inuse = false;
9
                  con.inuse = false;
10
                  return true;
10
                  return true;
11
              }
11
              }
12
              con.inuse = false;
12
              con.inuse = false;
13
              return false;
13
              return false;
14
          }
14
          }
15
          /*
15
          /*
16
           * The pattern contains a fixed string.
16
           * The pattern contains a fixed string.
17
           * The engine checks with Boyer-Moore whether the text contains the fixed string or not.
17
           * The engine checks with Boyer-Moore whether the text contains the fixed string or not.
18
           * If not, it return with false.
18
           * If not, it return with false.
19
           */
19
           */
20
          if (this.fixedString != null) {
20
          if (this.fixedString != null) {
21
              int o = this.fixedStringTable.matches(target, con.start, con.limit);
21
              int o = this.fixedStringTable.matches(target, con.start, con.limit);
22
              if (o < 0) {
22
              if (o < 0) {
23
                  //System.err.println("Non-match in fixed-string search.");
23
                  //System.err.println("Non-match in fixed-string search.");
24
                  con.inuse = false;
24
                  con.inuse = false;
25
                  return false;
25
                  return false;
26
              }
26
              }
27
          }
27
          }
28
          int limit = con.limit-this.minlength;
28
          int limit = con.limit-this.minlength;
29
          int matchStart;
29
          int matchStart;
30
          int matchEnd = -1;
30
          int matchEnd = -1;
31
          /*
31
          /*
32
           * Checks whether the expression starts with ".*".
32
           * Checks whether the expression starts with ".*".
33
           */
33
           */
34
          if (this.operations != null
34
          if (this.operations != null
35
              && this.operations.type == Op.CLOSURE && this.operations.getChild().type == Op.DOT) {
35
              && this.operations.type == Op.CLOSURE && this.operations.getChild().type == Op.DOT) {
36
              if (isSet(this.options, SINGLE_LINE)) {
36
              if (isSet(this.options, SINGLE_LINE)) {
37
                  matchStart = con.start;
37
                  matchStart = con.start;
38
                  matchEnd = this. matchCharArray (con, this.operations, con.start, 1, this.options);
38
                  matchEnd = this. matchCharacterIterator (con, this.operations, con.start, 1, this.options);
39
              } else {
39
              } else {
40
                  boolean previousIsEOL = true;
40
                  boolean previousIsEOL = true;
41
                  for (matchStart = con.start;  matchStart <= limit;  matchStart ++) {
41
                  for (matchStart = con.start;  matchStart <= limit;  matchStart ++) {
42
                      int ch =  target [  matchStart ] ;
42
                      int ch =  target .setIndex(  matchStart ) ;
43
                      if (isEOLChar(ch)) {
43
                      if (isEOLChar(ch)) {
44
                          previousIsEOL = true;
44
                          previousIsEOL = true;
45
                      } else {
45
                      } else {
46
                          if (previousIsEOL) {
46
                          if (previousIsEOL) {
47
                              if (0 <= (matchEnd = this. matchCharArray (con, this.operations,
47
                              if (0 <= (matchEnd = this. matchCharacterIterator (con, this.operations,
48
                                                                         matchStart, 1, this.options)))
48
                                                                                 matchStart, 1, this.options)))
49
                                  break;
49
                                  break;
50
                          }
50
                          }
51
                          previousIsEOL = false;
51
                          previousIsEOL = false;
52
                      }
52
                      }
53
                  }
53
                  }
54
              }
54
              }
55
          }
55
          }
56
          /*
56
          /*
57
           * Optimization against the first character.
57
           * Optimization against the first character.
58
           */
58
           */
59
          else if (this.firstChar != null) {
59
          else if (this.firstChar != null) {
60
              //System.err.println("DEBUG: with firstchar-matching: "+this.firstChar);
60
              //System.err.println("DEBUG: with firstchar-matching: "+this.firstChar);
61
              RangeToken range = this.firstChar;
61
              RangeToken range = this.firstChar;
62
              if (RegularExpression.isSet(this.options, IGNORE_CASE)) {
62
              if (RegularExpression.isSet(this.options, IGNORE_CASE)) {
63
                  range = this.firstChar.getCaseInsensitiveToken();
63
                  range = this.firstChar.getCaseInsensitiveToken();
64
                  for (matchStart = con.start;  matchStart <= limit;  matchStart ++) {
64
                  for (matchStart = con.start;  matchStart <= limit;  matchStart ++) {
65
                      int ch =  target [  matchStart ] ;
65
                      int ch =  target .setIndex(  matchStart ) ;
66
                      if (REUtil.isHighSurrogate(ch) && matchStart+1 < con.limit) {
66
                      if (REUtil.isHighSurrogate(ch) && matchStart+1 < con.limit) {
67
                          ch = REUtil.composeFromSurrogates(ch,  target [  matchStart+1 ] );
67
                          ch = REUtil.composeFromSurrogates(ch,  target .setIndex(  matchStart+1 ) );
68
                          if (!range.match(ch))  continue;
68
                          if (!range.match(ch))  continue;
69
                      } else {
69
                      } else {
70
                          if (!range.match(ch)) {
70
                          if (!range.match(ch)) {
71
                              char ch1 = Character.toUpperCase((char)ch);
71
                              char ch1 = Character.toUpperCase((char)ch);
72
                              if (!range.match(ch1))
72
                              if (!range.match(ch1))
73
                                  if (!range.match(Character.toLowerCase(ch1)))
73
                                  if (!range.match(Character.toLowerCase(ch1)))
74
                                      continue;
74
                                      continue;
75
                          }
75
                          }
76
                      }
76
                      }
77
                      if (0 <= (matchEnd = this. matchCharArray (con, this.operations,
77
                      if (0 <= (matchEnd = this. matchCharacterIterator (con, this.operations,
78
                                                                 matchStart, 1, this.options)))
78
                                                                         matchStart, 1, this.options)))
79
                          break;
79
                          break;
80
                  }
80
                  }
81
              } else {
81
              } else {
82
                  for (matchStart = con.start;  matchStart <= limit;  matchStart ++) {
82
                  for (matchStart = con.start;  matchStart <= limit;  matchStart ++) {
83
                      int ch =  target [  matchStart ] ;
83
                      int ch =  target .setIndex(  matchStart ) ;
84
                      if (REUtil.isHighSurrogate(ch) && matchStart+1 < con.limit)
84
                      if (REUtil.isHighSurrogate(ch) && matchStart+1 < con.limit)
85
                          ch = REUtil.composeFromSurrogates(ch,  target [  matchStart+1 ] );
85
                          ch = REUtil.composeFromSurrogates(ch,  target .setIndex(  matchStart+1 ) );
86
                      if (!range.match(ch))  continue;
86
                      if (!range.match(ch))  continue;
87
                      if (0 <= (matchEnd = this. matchCharArray (con, this.operations,
87
                      if (0 <= (matchEnd = this. matchCharacterIterator (con, this.operations,
88
                                                                 matchStart, 1, this.options)))
88
                                                                         matchStart, 1, this.options)))
89
                          break;
89
                          break;
90
                  }
90
                  }
91
              }
91
              }
92
          }
92
          }
93
          /*
93
          /*
94
           * Straightforward matching.
94
           * Straightforward matching.
95
           */
95
           */
96
          else {
96
          else {
97
              for (matchStart = con.start;  matchStart <= limit;  matchStart ++) {
97
              for (matchStart = con.start;  matchStart <= limit;  matchStart ++) {
98
                  if (0 <= (matchEnd = this. matchCharArray (con, this.operations, matchStart, 1, this.options)))
98
                  if (0 <= (matchEnd = this. matchCharacterIterator (con, this.operations, matchStart, 1, this.options)))
99
                      break;
99
                      break;
100
              }
100
              }
101
          }
101
          }
102
          if (matchEnd >= 0) {
102
          if (matchEnd >= 0) {
103
              if (con.match != null) {
103
              if (con.match != null) {
104
                  con.match.setBeginning(0, matchStart);
104
                  con.match.setBeginning(0, matchStart);
105
                  con.match.setEnd(0, matchEnd);
105
                  con.match.setEnd(0, matchEnd);
106
              }
106
              }
107
              con.inuse = false;
107
              con.inuse = false;
108
              return true;
108
              return true;
109
          } else {
109
          } else {
110
              con.inuse = false;
110
              con.inuse = false;
111
              return false;
111
              return false;
112
          }
112
          }
Summary
Number of common nesting structure subtrees1
Number of refactorable cases0
Number of non-refactorable cases1
Time elapsed for finding largest common nesting structure subtrees (ms)14.2
Clones locationClones are declared in the same class
Number of node comparisons369
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements67
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)26.2
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    26
    if (this.fixedStringOnly)
    28
    if (this.fixedStringOnly)
    27
    int o = this.fixedStringTable.matches(target, con.start, con.limit);
    27
    int o = this.fixedStringTable.matches(target, con.start, con.limit);
    29
    int o = this.fixedStringTable.matches(target, con.start, con.limit);
    Differences
    Expression1Expression2Difference
    char[]java.text.CharacterIteratorVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type char[] of variable target does not match with type java.text.CharacterIterator of variable target
    • Make classes char[] and java.text.CharacterIterator extend a common superclass
    29
    int o = this.fixedStringTable.matches(target, con.start, con.limit);
    28
    if (o >= 0)
    30
    if (o >= 0)
    29
    if (con.match != null)
    31
    if (con.match != null)
    30
    con.match.setBeginning(0, o);
    32
    con.match.setBeginning(0, o);
    31
    con.match.setEnd(0, o + this.fixedString.length());
    33
    con.match.setEnd(0, o + this.fixedString.length());
    32
    con.inuse = false;
    34
    con.inuse = false;
    33
    return true;
    33
    return true;
    35
    return true;
    Preondition Violations
    Conditional return true;
    Conditional return true;
    35
    return true;
    34
    con.inuse = false;
    36
    con.inuse = false;
    35
    return false;
    35
    return false;
    37
    return false;
    Preondition Violations
    Conditional return false;
    Conditional return false;
    37
    return false;
    36
    if (this.fixedString != null)
    38
    if (this.fixedString != null)
    37
    int o = this.fixedStringTable.matches(target, con.start, con.limit);
    37
    int o = this.fixedStringTable.matches(target, con.start, con.limit);
    39
    int o = this.fixedStringTable.matches(target, con.start, con.limit);
    Differences
    Expression1Expression2Difference
    char[]java.text.CharacterIteratorVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type char[] of variable target does not match with type java.text.CharacterIterator of variable target
    • Make classes char[] and java.text.CharacterIterator extend a common superclass
    39
    int o = this.fixedStringTable.matches(target, con.start, con.limit);
    38
    if (o < 0)
    40
    if (o < 0)
    39
    con.inuse = false;
    41
    con.inuse = false;
    40
    return false;
    40
    return false;
    42
    return false;
    Preondition Violations
    Conditional return false;
    Conditional return false;
    42
    return false;
    41
    int limit = con.limit - this.minlength;
    43
    int limit = con.limit - this.minlength;
    42
    int matchStart;
    44
    int matchStart;
    43
    int matchEnd = -1;
    45
    int matchEnd = -1;
    44
    if (this.operations != null && this.operations.type == Op.CLOSURE && this.operations.getChild().type == Op.DOT)
    46
    if (this.operations != null && this.operations.type == Op.CLOSURE && this.operations.getChild().type == Op.DOT)
    45
    if (isSet(this.options, SINGLE_LINE))
    47
    if (isSet(this.options, SINGLE_LINE))
    46
    matchStart = con.start;
    48
    matchStart = con.start;
    47
    matchEnd = this.matchCharArray(con, this.operations, con.start, 1, this.options);
    47
    matchEnd = this.matchCharArray(con, this.operations, con.start, 1, this.options);
    49
    matchEnd = this.matchCharacterIterator(con, this.operations, con.start, 1, this.options);
    Differences
    Expression1Expression2Difference
    matchCharArraymatchCharacterIteratorMETHOD_INVOCATION_NAME_MISMATCH
    Preondition Violations
    Expression this.matchCharArray(con,this.operations,con.start,1,this.options) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    • Inline private method matchCharArray
    Expression this.matchCharacterIterator(con,this.operations,con.start,1,this.options) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    • Inline private method matchCharacterIterator
    49
    matchEnd = this.matchCharacterIterator(con, this.operations, con.start, 1, this.options);
    else
    else
    48
    boolean previousIsEOL = true;
    50
    boolean previousIsEOL = true;
    49
    for (matchStart = con.start; matchStart <= limit; matchStart++)
    51
    for (matchStart = con.start; matchStart <= limit; matchStart++)
    50
    int ch = target[matchStart];
    50
    int ch = target[matchStart];
    52
    int ch = target.setIndex(matchStart);
    Differences
    Expression1Expression2Difference
    target[matchStart]target.setIndex(matchStart)TYPE_COMPATIBLE_REPLACEMENT
    Preondition Violations
    Expression target[matchStart] cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression target.setIndex(matchStart) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    52
    int ch = target.setIndex(matchStart);
    51
    if (isEOLChar(ch))
    53
    if (isEOLChar(ch))
    52
    previousIsEOL = true;
    54
    previousIsEOL = true;
    else
    else
    53
    if (previousIsEOL)
    55
    if (previousIsEOL)
    54
    if (0 <= (matchEnd = this.matchCharArray(con, this.operations, matchStart, 1, this.options)))
    54
    if (0 <= (matchEnd = this.matchCharArray(con, this.operations, matchStart, 1, this.options)))
    56
    if (0 <= (matchEnd = this.matchCharacterIterator(con, this.operations, matchStart, 1, this.options)))
    Differences
    Expression1Expression2Difference
    matchCharArraymatchCharacterIteratorMETHOD_INVOCATION_NAME_MISMATCH
    Preondition Violations
    Expression this.matchCharArray(con,this.operations,matchStart,1,this.options) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    • Inline private method matchCharArray
    Expression this.matchCharacterIterator(con,this.operations,matchStart,1,this.options) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    • Inline private method matchCharacterIterator
    56
    if (0 <= (matchEnd = this.matchCharacterIterator(con, this.operations, matchStart, 1, this.options)))
    55
    break;
    57
    break;
    56
    previousIsEOL = false;
    58
    previousIsEOL = false;
    57
    else if (this.firstChar != null)
    59
    else if (this.firstChar != null)
    58
    RangeToken range = this.firstChar;
    60
    RangeToken range = this.firstChar;
    59
    if (RegularExpression.isSet(this.options, IGNORE_CASE))
    61
    if (RegularExpression.isSet(this.options, IGNORE_CASE))
    60
    range = this.firstChar.getCaseInsensitiveToken();
    62
    range = this.firstChar.getCaseInsensitiveToken();
    61
    for (matchStart = con.start; matchStart <= limit; matchStart++)
    63
    for (matchStart = con.start; matchStart <= limit; matchStart++)
    62
    int ch = target[matchStart];
    62
    int ch = target[matchStart];
    64
    int ch = target.setIndex(matchStart);
    Differences
    Expression1Expression2Difference
    target[matchStart]target.setIndex(matchStart)TYPE_COMPATIBLE_REPLACEMENT
    Preondition Violations
    Expression target[matchStart] cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression target.setIndex(matchStart) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    64
    int ch = target.setIndex(matchStart);
    63
    if (REUtil.isHighSurrogate(ch) && matchStart + 1 < con.limit)
    65
    if (REUtil.isHighSurrogate(ch) && matchStart + 1 < con.limit)
    64
    ch = REUtil.composeFromSurrogates(ch, target[matchStart + 1]);
    64
    ch = REUtil.composeFromSurrogates(ch, target[matchStart + 1]);
    66
    ch = REUtil.composeFromSurrogates(ch, target.setIndex(matchStart + 1));
    Differences
    Expression1Expression2Difference
    target[matchStart + 1]target.setIndex(matchStart + 1)TYPE_COMPATIBLE_REPLACEMENT
    Preondition Violations
    Expression target[matchStart + 1] cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression target.setIndex(matchStart + 1) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    66
    ch = REUtil.composeFromSurrogates(ch, target.setIndex(matchStart + 1));
    65
    if (!range.match(ch))
    67
    if (!range.match(ch))
    66
    continue;
    68
    continue;
    else
    else
    67
    if (!range.match(ch))
    69
    if (!range.match(ch))
    68
    char ch1 = Character.toUpperCase((char)ch);
    70
    char ch1 = Character.toUpperCase((char)ch);
    69
    if (!range.match(ch1))
    71
    if (!range.match(ch1))
    70
    if (!range.match(Character.toLowerCase(ch1)))
    72
    if (!range.match(Character.toLowerCase(ch1)))
    71
    continue;
    73
    continue;
    72
    if (0 <= (matchEnd = this.matchCharArray(con, this.operations, matchStart, 1, this.options)))
    72
    if (0 <= (matchEnd = this.matchCharArray(con, this.operations, matchStart, 1, this.options)))
    74
    if (0 <= (matchEnd = this.matchCharacterIterator(con, this.operations, matchStart, 1, this.options)))
    Differences
    Expression1Expression2Difference
    matchCharArraymatchCharacterIteratorMETHOD_INVOCATION_NAME_MISMATCH
    Preondition Violations
    Expression this.matchCharArray(con,this.operations,matchStart,1,this.options) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    • Inline private method matchCharArray
    Expression this.matchCharacterIterator(con,this.operations,matchStart,1,this.options) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    • Inline private method matchCharacterIterator
    74
    if (0 <= (matchEnd = this.matchCharacterIterator(con, this.operations, matchStart, 1, this.options)))
    73
    break;
    75
    break;
    else
    else
    74
    for (matchStart = con.start; matchStart <= limit; matchStart++)
    76
    for (matchStart = con.start; matchStart <= limit; matchStart++)
    75
    int ch = target[matchStart];
    75
    int ch = target[matchStart];
    77
    int ch = target.setIndex(matchStart);
    Differences
    Expression1Expression2Difference
    target[matchStart]target.setIndex(matchStart)TYPE_COMPATIBLE_REPLACEMENT
    Preondition Violations
    Expression target[matchStart] cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression target.setIndex(matchStart) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    77
    int ch = target.setIndex(matchStart);
    76
    if (REUtil.isHighSurrogate(ch) && matchStart + 1 < con.limit)
    78
    if (REUtil.isHighSurrogate(ch) && matchStart + 1 < con.limit)
    77
    ch = REUtil.composeFromSurrogates(ch, target[matchStart + 1]);
    77
    ch = REUtil.composeFromSurrogates(ch, target[matchStart + 1]);
    79
    ch = REUtil.composeFromSurrogates(ch, target.setIndex(matchStart + 1));
    Differences
    Expression1Expression2Difference
    target[matchStart + 1]target.setIndex(matchStart + 1)TYPE_COMPATIBLE_REPLACEMENT
    Preondition Violations
    Expression target[matchStart + 1] cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression target.setIndex(matchStart + 1) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    79
    ch = REUtil.composeFromSurrogates(ch, target.setIndex(matchStart + 1));
    78
    if (!range.match(ch))
    80
    if (!range.match(ch))
    79
    continue;
    81
    continue;
    80
    if (0 <= (matchEnd = this.matchCharArray(con, this.operations, matchStart, 1, this.options)))
    80
    if (0 <= (matchEnd = this.matchCharArray(con, this.operations, matchStart, 1, this.options)))
    82
    if (0 <= (matchEnd = this.matchCharacterIterator(con, this.operations, matchStart, 1, this.options)))
    Differences
    Expression1Expression2Difference
    matchCharArraymatchCharacterIteratorMETHOD_INVOCATION_NAME_MISMATCH
    Preondition Violations
    Expression this.matchCharArray(con,this.operations,matchStart,1,this.options) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    • Inline private method matchCharArray
    Expression this.matchCharacterIterator(con,this.operations,matchStart,1,this.options) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    • Inline private method matchCharacterIterator
    82
    if (0 <= (matchEnd = this.matchCharacterIterator(con, this.operations, matchStart, 1, this.options)))
    81
    break;
    83
    break;
    else
    else
    82
    for (matchStart = con.start; matchStart <= limit; matchStart++)
    84
    for (matchStart = con.start; matchStart <= limit; matchStart++)
    83
    if (0 <= (matchEnd = this.matchCharArray(con, this.operations, matchStart, 1, this.options)))
    83
    if (0 <= (matchEnd = this.matchCharArray(con, this.operations, matchStart, 1, this.options)))
    85
    if (0 <= (matchEnd = this.matchCharacterIterator(con, this.operations, matchStart, 1, this.options)))
    Differences
    Expression1Expression2Difference
    matchCharArraymatchCharacterIteratorMETHOD_INVOCATION_NAME_MISMATCH
    Preondition Violations
    Expression this.matchCharArray(con,this.operations,matchStart,1,this.options) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    • Inline private method matchCharArray
    Expression this.matchCharacterIterator(con,this.operations,matchStart,1,this.options) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    • Inline private method matchCharacterIterator
    85
    if (0 <= (matchEnd = this.matchCharacterIterator(con, this.operations, matchStart, 1, this.options)))
    84
    break;
    86
    break;
    85
    if (matchEnd >= 0)
    87
    if (matchEnd >= 0)
    86
    if (con.match != null)
    88
    if (con.match != null)
    87
    con.match.setBeginning(0, matchStart);
    89
    con.match.setBeginning(0, matchStart);
    88
    con.match.setEnd(0, matchEnd);
    90
    con.match.setEnd(0, matchEnd);
    89
    con.inuse = false;
    91
    con.inuse = false;
    90
    return true;
    90
    return true;
    92
    return true;
    Preondition Violations
    Conditional return true;
    Conditional return true;
    92
    return true;
    else
    else
    91
    con.inuse = false;
    93
    con.inuse = false;
    92
    return false;
    92
    return false;
    94
    return false;
    Preondition Violations
    Conditional return false;
    Conditional return false;
    94
    return false;
    Precondition Violations (32)
    Row Violation
    1Type char[] of variable target does not match with type java.text.CharacterIterator of variable target
    2Type char[] of variable target does not match with type java.text.CharacterIterator of variable target
    3Expression this.matchCharArray(con,this.operations,con.start,1,this.options) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    4Expression this.matchCharacterIterator(con,this.operations,con.start,1,this.options) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    5Expression target[matchStart] cannot be parameterized, because it has dependencies to/from statements that will be extracted
    6Expression target.setIndex(matchStart) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    7Expression this.matchCharArray(con,this.operations,matchStart,1,this.options) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    8Expression this.matchCharacterIterator(con,this.operations,matchStart,1,this.options) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    9Expression target[matchStart] cannot be parameterized, because it has dependencies to/from statements that will be extracted
    10Expression target.setIndex(matchStart) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    11Expression target[matchStart + 1] cannot be parameterized, because it has dependencies to/from statements that will be extracted
    12Expression target.setIndex(matchStart + 1) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    13Expression this.matchCharArray(con,this.operations,matchStart,1,this.options) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    14Expression this.matchCharacterIterator(con,this.operations,matchStart,1,this.options) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    15Expression target[matchStart] cannot be parameterized, because it has dependencies to/from statements that will be extracted
    16Expression target.setIndex(matchStart) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    17Expression target[matchStart + 1] cannot be parameterized, because it has dependencies to/from statements that will be extracted
    18Expression target.setIndex(matchStart + 1) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    19Expression this.matchCharArray(con,this.operations,matchStart,1,this.options) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    20Expression this.matchCharacterIterator(con,this.operations,matchStart,1,this.options) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    21Expression this.matchCharArray(con,this.operations,matchStart,1,this.options) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    22Expression this.matchCharacterIterator(con,this.operations,matchStart,1,this.options) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    23Conditional return true;
    24Conditional return true;
    25Conditional return false;
    26Conditional return false;
    27Conditional return false;
    28Conditional return false;
    29Conditional return false;
    30Conditional return false;
    31Conditional return true;
    32Conditional return true;