private static final int getPreviousWordType(String target, int begin, int end, int offset, int opts) { int ret = getWordType(target, begin, end, --offset, opts); while (ret == WT_IGNORE) ret = getWordType(target, begin, end, --offset, opts); return ret; } private static final int getWordType(String target, int begin, int end, int offset, int opts) { if (offset < begin || offset >= end) return WT_OTHER; return getWordType0( target .charAt( offset ) , opts);
private static final int getPreviousWordType(CharacterIterator target, int begin, int end, int offset, int opts) { int ret = getWordType(target, begin, end, --offset, opts); while (ret == WT_IGNORE) ret = getWordType(target, begin, end, --offset, opts); return ret; } private static final int getWordType(CharacterIterator target, int begin, int end, int offset, int opts) { if (offset < begin || offset >= end) return WT_OTHER; return getWordType0( target .setIndex( offset ) , opts);
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
private static final int getPreviousWordType(String  target, int begin, int end,
1
private static final int getPreviousWordType(CharacterIterator  target, int begin, int end,
2
                                                   int offset, int opts) {
2
                                                   int offset, int opts) {
3
          int ret = getWordType(target, begin, end, --offset, opts);
3
          int ret = getWordType(target, begin, end, --offset, opts);
4
          while (ret == WT_IGNORE)
4
          while (ret == WT_IGNORE)
5
              ret = getWordType(target, begin, end, --offset, opts);
5
              ret = getWordType(target, begin, end, --offset, opts);
6
          return ret;
6
          return ret;
7
      }
7
      }
8
      private static final int getWordType(String  target, int begin, int end,
8
      private static final int getWordType(CharacterIterator  target, int begin, int end,
9
                                           int offset, int opts) {
9
                                           int offset, int opts) {
10
          if (offset < begin || offset >= end)  return WT_OTHER;
10
          if (offset < begin || offset >= end)  return WT_OTHER;
11
          return getWordType0( target .charAt(  offset ) , opts);
11
          return getWordType0( target .setIndex(  offset ) , opts);
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