if (RegularExpression.isSet(this.options, IGNORE_CASE)) { range = this.firstChar.getCaseInsensitiveToken(); for (matchStart = con.start; matchStart <= limit; matchStart ++) { int ch = target .charAt( matchStart ) ; if (REUtil.isHighSurrogate(ch) && matchStart+1 < con.limit) { ch = REUtil.composeFromSurrogates(ch, target .charAt( 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. matchString (con, this.operations, matchStart, 1, this.options))) break; } } else { for (matchStart = con.start; matchStart <= limit; matchStart ++) { int ch = target .charAt( matchStart ) ; if (REUtil.isHighSurrogate(ch) && matchStart+1 < con.limit) ch = REUtil.composeFromSurrogates(ch, target .charAt( matchStart+1 ) ); if (!range.match(ch)) continue; if (0 <= (matchEnd = this. matchString (con, this.operations, matchStart, 1, this.options))) break;
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;
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: Method name:
Number of AST nodes: 0 Number of AST nodes: 0
1
if (RegularExpression.isSet(this.options, IGNORE_CASE)) {
1
if (RegularExpression.isSet(this.options, IGNORE_CASE)) {
2
                  range = this.firstChar.getCaseInsensitiveToken();
2
                  range = this.firstChar.getCaseInsensitiveToken();
3
                  for (matchStart = con.start;  matchStart <= limit;  matchStart ++) {
3
                  for (matchStart = con.start;  matchStart <= limit;  matchStart ++) {
4
                      int ch =  target .charAt(  matchStart ) ;
4
                      int ch =  target .setIndex(  matchStart ) ;
5
                      if (REUtil.isHighSurrogate(ch) && matchStart+1 < con.limit) {
5
                      if (REUtil.isHighSurrogate(ch) && matchStart+1 < con.limit) {
6
                          ch = REUtil.composeFromSurrogates(ch,  target .charAt(  matchStart+1 ) );
6
                          ch = REUtil.composeFromSurrogates(ch,  target .setIndex(  matchStart+1 ) );
7
                          if (!range.match(ch))  continue;
7
                          if (!range.match(ch))  continue;
8
                      } else {
8
                      } else {
9
                          if (!range.match(ch)) {
9
                          if (!range.match(ch)) {
10
                              char ch1 = Character.toUpperCase((char)ch);
10
                              char ch1 = Character.toUpperCase((char)ch);
11
                              if (!range.match(ch1))
11
                              if (!range.match(ch1))
12
                                  if (!range.match(Character.toLowerCase(ch1)))
12
                                  if (!range.match(Character.toLowerCase(ch1)))
13
                                      continue;
13
                                      continue;
14
                          }
14
                          }
15
                      }
15
                      }
16
                      if (0 <= (matchEnd = this. matchString (con, this.operations,
16
                      if (0 <= (matchEnd = this. matchCharacterIterator (con, this.operations,
17
                                                              matchStart, 1, this.options)))
17
                                                                         matchStart, 1, this.options)))
18
                          break;
18
                          break;
19
                  }
19
                  }
20
              } else {
20
              } else {
21
                  for (matchStart = con.start;  matchStart <= limit;  matchStart ++) {
21
                  for (matchStart = con.start;  matchStart <= limit;  matchStart ++) {
22
                      int ch =  target .charAt(  matchStart ) ;
22
                      int ch =  target .setIndex(  matchStart ) ;
23
                      if (REUtil.isHighSurrogate(ch) && matchStart+1 < con.limit)
23
                      if (REUtil.isHighSurrogate(ch) && matchStart+1 < con.limit)
24
                          ch = REUtil.composeFromSurrogates(ch,  target .charAt(  matchStart+1 ) );
24
                          ch = REUtil.composeFromSurrogates(ch,  target .setIndex(  matchStart+1 ) );
25
                      if (!range.match(ch))  continue;
25
                      if (!range.match(ch))  continue;
26
                      if (0 <= (matchEnd = this. matchString (con, this.operations,
26
                      if (0 <= (matchEnd = this. matchCharacterIterator (con, this.operations,
27
                                                              matchStart, 1, this.options)))
27
                                                                         matchStart, 1, this.options)))
28
                          break;
28
                          break;
29
                  
29
                  
Summary
Number of common nesting structure subtrees0
Number of refactorable cases0
Number of non-refactorable cases0
Time elapsed for finding largest common nesting structure subtrees (ms)0.0
Clones location
Number of node comparisons0