int localopts = opts; localopts |= op.getData(); localopts &= ~op.getData2(); //System.err.println("MODIFIER: "+Integer.toString(opts, 16)+" -> "+Integer.toString(localopts, 16)); int ret = this. matchCharacterIterator (con, op.getChild(), offset, dx, localopts); if (ret < 0) return ret; offset = ret; op = op.next;
int localopts = opts; localopts |= op.getData(); localopts &= ~op.getData2(); //System.err.println("MODIFIER: "+Integer.toString(opts, 16)+" -> "+Integer.toString(localopts, 16)); int ret = this. matchCharArray (con, op.getChild(), offset, dx, localopts); if (ret < 0) return ret; offset = ret; op = op.next;
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: int matchCharacterIterator(Context, Op, int, int, int) Method name: int matchCharArray(Context, Op, int, int, int)
Number of AST nodes: 8 Number of AST nodes: 8
1
int localopts = opts;
1
int localopts = opts;
2
                      localopts |= op.getData();
2
                      localopts |= op.getData();
3
                      localopts &= ~op.getData2();
3
                      localopts &= ~op.getData2();
4
                      //System.err.println("MODIFIER: "+Integer.toString(opts, 16)+" -> "+Integer.toString(localopts, 16));
4
                      //System.err.println("MODIFIER: "+Integer.toString(opts, 16)+" -> "+Integer.toString(localopts, 16));
5
                      int ret = this. matchCharacterIterator (con, op.getChild(), offset, dx, localopts);
5
                      int ret = this. matchCharArray (con, op.getChild(), offset, dx, localopts);
6
                      if (ret < 0)  return ret;
6
                      if (ret < 0)  return ret;
7
                      offset = ret;
7
                      offset = ret;
8
                      op = op.next;
8
                      op = op.next;
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)0.2
Clones locationClones are declared in the same class
Number of node comparisons44
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements8
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)57.8
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    291
    int localopts = opts;
    291
    int localopts = opts;
    292
    localopts |= op.getData();
    292
    localopts |= op.getData();
    293
    localopts &= ~op.getData2();
    293
    localopts &= ~op.getData2();
    294
    int ret = this.matchCharacterIterator(con, op.getChild(), offset, dx, localopts);
    294
    int ret = this.matchCharacterIterator(con, op.getChild(), offset, dx, localopts);
    294
    int ret = this.matchCharArray(con, op.getChild(), offset, dx, localopts);
    Differences
    Expression1Expression2Difference
    matchCharacterIteratormatchCharArrayMETHOD_INVOCATION_NAME_MISMATCH
    Preondition Violations
    Expression this.matchCharacterIterator(con,op.getChild(),offset,dx,localopts) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    • Inline private method matchCharacterIterator
    Expression this.matchCharArray(con,op.getChild(),offset,dx,localopts) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    • Inline private method matchCharArray
    294
    int ret = this.matchCharArray(con, op.getChild(), offset, dx, localopts);
    295
    if (ret < 0)
    295
    if (ret < 0)
    296
    return ret;
    296
    return ret;
    297
    offset = ret;
    297
    offset = ret;
    298
    op = op.next;
    298
    op = op.next;
    Precondition Violations (3)
    Row Violation
    1Expression this.matchCharacterIterator(con,op.getChild(),offset,dx,localopts) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    2Expression this.matchCharArray(con,op.getChild(),offset,dx,localopts) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    3Clone fragment #1 returns variables op, offset , while Clone fragment #2 returns variables op, offset