int refno = op.getData(); if (refno <= 0 || refno >= this.nofparen) throw new RuntimeException("Internal Error: Reference number must be more than zero: "+refno); if (con.match.getBeginning(refno) < 0 || con.match.getEnd(refno) < 0) return -1; // ******** int o2 = con.match.getBeginning(refno); int literallen = con.match.getEnd(refno)-o2; if (!isSet(opts, IGNORE_CASE)) { if (dx > 0) { if (!regionMatches(target, offset, con.limit, o2, literallen)) return -1; offset += literallen; } else { if (!regionMatches(target, offset-literallen, con.limit, o2, literallen)) return -1; offset -= literallen; } } else { if (dx > 0) { if (!regionMatchesIgnoreCase(target, offset, con.limit, o2, literallen)) return -1; offset += literallen; } else { if (!regionMatchesIgnoreCase(target, offset-literallen, con.limit, o2, literallen)) return -1; offset -= literallen;
int refno = op.getData(); if (refno <= 0 || refno >= this.nofparen) throw new RuntimeException("Internal Error: Reference number must be more than zero: "+refno); if (con.match.getBeginning(refno) < 0 || con.match.getEnd(refno) < 0) return -1; // ******** int o2 = con.match.getBeginning(refno); int literallen = con.match.getEnd(refno)-o2; if (!isSet(opts, IGNORE_CASE)) { if (dx > 0) { if (!regionMatches(target, offset, con.limit, o2, literallen)) return -1; offset += literallen; } else { if (!regionMatches(target, offset-literallen, con.limit, o2, literallen)) return -1; offset -= literallen; } } else { if (dx > 0) { if (!regionMatchesIgnoreCase(target, offset, con.limit, o2, literallen)) return -1; offset += literallen; } else { if (!regionMatchesIgnoreCase(target, offset-literallen, con.limit, o2, literallen)) return -1; offset -= literallen;
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
int refno = op.getData();
1
int refno = op.getData();
2
                      if (refno <= 0 || refno >= this.nofparen)
2
                      if (refno <= 0 || refno >= this.nofparen)
3
                          throw new RuntimeException("Internal Error: Reference number must be more than zero: "+refno);
3
                          throw new RuntimeException("Internal Error: Reference number must be more than zero: "+refno);
4
                      if (con.match.getBeginning(refno) < 0
4
                      if (con.match.getBeginning(refno) < 0
5
                          || con.match.getEnd(refno) < 0)
5
                          || con.match.getEnd(refno) < 0)
6
                          return -1;                // ********
6
                          return -1;                // ********
7
                      int o2 = con.match.getBeginning(refno);
7
                      int o2 = con.match.getBeginning(refno);
8
                      int literallen = con.match.getEnd(refno)-o2;
8
                      int literallen = con.match.getEnd(refno)-o2;
9
                      if (!isSet(opts, IGNORE_CASE)) {
9
                      if (!isSet(opts, IGNORE_CASE)) {
10
                          if (dx > 0) {
10
                          if (dx > 0) {
11
                              if (!regionMatches(target, offset, con.limit, o2, literallen))
11
                              if (!regionMatches(target, offset, con.limit, o2, literallen))
12
                                  return -1;
12
                                  return -1;
13
                              offset += literallen;
13
                              offset += literallen;
14
                          } else {
14
                          } else {
15
                              if (!regionMatches(target, offset-literallen, con.limit, o2, literallen))
15
                              if (!regionMatches(target, offset-literallen, con.limit, o2, literallen))
16
                                  return -1;
16
                                  return -1;
17
                              offset -= literallen;
17
                              offset -= literallen;
18
                          }
18
                          }
19
                      } else {
19
                      } else {
20
                          if (dx > 0) {
20
                          if (dx > 0) {
21
                              if (!regionMatchesIgnoreCase(target, offset, con.limit, o2, literallen))
21
                              if (!regionMatchesIgnoreCase(target, offset, con.limit, o2, literallen))
22
                                  return -1;
22
                                  return -1;
23
                              offset += literallen;
23
                              offset += literallen;
24
                          } else {
24
                          } else {
25
                              if (!regionMatchesIgnoreCase(target, offset-literallen, con.limit,
25
                              if (!regionMatchesIgnoreCase(target, offset-literallen, con.limit,
26
                                                           o2, literallen))
26
                                                           o2, literallen))
27
                                  return -1;
27
                                  return -1;
28
                              offset -= literallen;
28
                              offset -= literallen;
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