if (isEOLChar(ch)) { previousIsEOL = true; } else { if (previousIsEOL) { if (0 <= (matchEnd = this. matchCharArray (con, this.operations, matchStart, 1, this.options))) break; } previousIsEOL = false; }
if (isEOLChar(ch)) { previousIsEOL = true; } else { if (previousIsEOL) { if (0 <= (matchEnd = this. matchString (con, this.operations, matchStart, 1, this.options))) break; } previousIsEOL = false; }
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(char[], int, int, Match) Method name: boolean matches(String, int, int, Match)
Number of AST nodes: 6 Number of AST nodes: 6
1
if (isEOLChar(ch)) {
1
if (isEOLChar(ch)) {
2
                          previousIsEOL = true;
2
                          previousIsEOL = true;
3
                      } else {
3
                      } else {
4
                          if (previousIsEOL) {
4
                          if (previousIsEOL) {
5
                              if (0 <= (matchEnd = this. matchCharArray (con, this.operations,
5
                              if (0 <= (matchEnd = this. matchString (con, this.operations,
6
                                                                         matchStart, 1, this.options)))
6
                                                                      matchStart, 1, this.options)))
7
                                  break;
7
                                  break;
8
                          }
8
                          }
9
                          previousIsEOL = false;
9
                          previousIsEOL = false;
10
                      }
10
                      }
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.5
Clones locationClones are declared in the same class
Number of node comparisons15
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements6
    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.7
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    51
    if (isEOLChar(ch))
    56
    if (isEOLChar(ch))
    52
    previousIsEOL = true;
    57
    previousIsEOL = true;
    else
    else
    53
    if (previousIsEOL)
    58
    if (previousIsEOL)
    54
    if (0 <= (matchEnd = this.matchCharArray(con, this.operations, matchStart, 1, this.options)))
    54
    if (0 <= (matchEnd = this.matchCharArray(con, this.operations, matchStart, 1, this.options)))
    59
    if (0 <= (matchEnd = this.matchString(con, this.operations, matchStart, 1, this.options)))
    Differences
    Expression1Expression2Difference
    matchCharArraymatchStringMETHOD_INVOCATION_NAME_MISMATCH
    59
    if (0 <= (matchEnd = this.matchString(con, this.operations, matchStart, 1, this.options)))
    55
    break;
    55
    break;
    60
    break;
    Preondition Violations
    Statement break; without innermost loop
    Statement break; without innermost loop
    60
    break;
    56
    previousIsEOL = false;
    61
    previousIsEOL = false;
    Precondition Violations (3)
    Row Violation
    1Statement break; without innermost loop
    2Statement break; without innermost loop
    3Clone fragment #1 returns variables matchEnd, previousIsEOL , while Clone fragment #2 returns variables matchEnd, previousIsEOL