if (matchEnd == con.limit) { if (con.match != null) { con.match.setBeginning(0, con.start); con.match.setEnd(0, matchEnd); } con.inuse = false; return true; }
if (con.match != null) { con.match.setBeginning(0, matchStart); con.match.setEnd(0, matchEnd); } con.inuse = false; return true;
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: boolean matches(String, int, int, Match) Method name: boolean matches(char[], int, int, Match)
Number of AST nodes: 6 Number of AST nodes: 5
1
if (matchEnd == con.limit) {
2
                  if (con.match != null) {
1
if (con.match != null) {
3
                      con.match.setBeginning(0, con.start);
2
                  con.match.setBeginning(0, matchStart);
4
                      con.match.setEnd(0, matchEnd);
3
                  con.match.setEnd(0, matchEnd);
5
                  }
4
              }
6
                  con.inuse = false;
5
              con.inuse = false;
7
                  return true;
6
              return true;
8
              }
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 comparisons14
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements5
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)1.5
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    25
    if (con.match != null)
    86
    if (con.match != null)
    26
    con.match.setBeginning(0, con.start);
    26
    con.match.setBeginning(0, con.start);
    87
    con.match.setBeginning(0, matchStart);
    Differences
    Expression1Expression2Difference
    con.startmatchStartTYPE_COMPATIBLE_REPLACEMENT
    Preondition Violations
    Expression con.start cannot be parameterized, because it has dependencies to/from statements that will be extracted
    87
    con.match.setBeginning(0, matchStart);
    27
    con.match.setEnd(0, matchEnd);
    88
    con.match.setEnd(0, matchEnd);
    28
    con.inuse = false;
    89
    con.inuse = false;
    29
    return true;
    29
    return true;
    90
    return true;
    Preondition Violations
    Conditional return true;
    Conditional return true;
    90
    return true;
    Precondition Violations (3)
    Row Violation
    1Expression con.start cannot be parameterized, because it has dependencies to/from statements that will be extracted
    2Conditional return true;
    3Conditional return true;