if (con.length == 0) go = true; else { int after = getWordType(target, con.start, con.limit, offset, opts); go = after == WT_IGNORE || after == getPreviousWordType(target, con.start, con.limit, offset, opts); }
if (con.length == 0) go = true; else { int after = getWordType(target, con.start, con.limit, offset, opts); go = after == WT_IGNORE || after == getPreviousWordType(target, con.start, con.limit, 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: int matchString(Context, Op, int, int, int) Method name: int matchCharacterIterator(Context, Op, int, int, int)
Number of AST nodes: 4 Number of AST nodes: 4
1
if (con.length == 0)
1
if (con.length == 0)
2
                          go = true;
2
                          go = true;
3
                      else {
3
                      else {
4
                          int after = getWordType(target, con.start, con.limit, offset, opts);
4
                          int after = getWordType(target, con.start, con.limit, offset, opts);
5
                          go = after == WT_IGNORE
5
                          go = after == WT_IGNORE
6
                               || after == getPreviousWordType(target, con.start, con.limit, offset, opts);
6
                               || after == getPreviousWordType(target, con.start, con.limit, offset, opts);
7
                      }
7
                      }
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 comparisons18
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements4
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)9.7
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    141
    if (con.length == 0)
    141
    if (con.length == 0)
    142
    go = true;
    142
    go = true;
    else
    else
    143
    int after = getWordType(target, con.start, con.limit, offset, opts);
    143
    int after = getWordType(target, con.start, con.limit, offset, opts);
    143
    int after = getWordType(target, con.start, con.limit, offset, opts);
    Differences
    Expression1Expression2Difference
    java.lang.Stringjava.text.CharacterIteratorVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type java.lang.String of variable target does not match with type java.text.CharacterIterator of variable target
    • Make classes java.lang.String and java.text.CharacterIterator extend a common superclass
    143
    int after = getWordType(target, con.start, con.limit, offset, opts);
    144
    go = after == WT_IGNORE || after == getPreviousWordType(target, con.start, con.limit, offset, opts);
    144
    go = after == WT_IGNORE || after == getPreviousWordType(target, con.start, con.limit, offset, opts);
    144
    go = after == WT_IGNORE || after == getPreviousWordType(target, con.start, con.limit, offset, opts);
    Differences
    Expression1Expression2Difference
    java.lang.Stringjava.text.CharacterIteratorVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type java.lang.String of variable target does not match with type java.text.CharacterIterator of variable target
    • Make classes java.lang.String and java.text.CharacterIterator extend a common superclass
    144
    go = after == WT_IGNORE || after == getPreviousWordType(target, con.start, con.limit, offset, opts);
    Precondition Violations (2)
    Row Violation
    1Type java.lang.String of variable target does not match with type java.text.CharacterIterator of variable target
    2Type java.lang.String of variable target does not match with type java.text.CharacterIterator of variable target