if (this.fixedString != null) { int o = this.fixedStringTable.matches(target, con.start, con.limit); if (o < 0) { //System.err.println("Non-match in fixed-string search."); con.inuse = false; return false; } }
if (this.fixedString != null) { int o = this.fixedStringTable.matches(target, con.start, con.limit); if (o < 0) { //System.err.println("Non-match in fixed-string search."); con.inuse = false; return 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: 5 Number of AST nodes: 5
1
if (this.fixedString != null) {
1
if (this.fixedString != null) {
2
              int o = this.fixedStringTable.matches(target, con.start, con.limit);
2
              int o = this.fixedStringTable.matches(target, con.start, con.limit);
3
              if (o < 0) {
3
              if (o < 0) {
4
                  //System.err.println("Non-match in fixed-string search.");
4
                  //System.err.println("Non-match in fixed-string search.");
5
                  con.inuse = false;
5
                  con.inuse = false;
6
                  return false;
6
                  return false;
7
              }
7
              }
8
          }
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 comparisons13
  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)0.9
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    36
    if (this.fixedString != null)
    41
    if (this.fixedString != null)
    37
    int o = this.fixedStringTable.matches(target, con.start, con.limit);
    37
    int o = this.fixedStringTable.matches(target, con.start, con.limit);
    42
    int o = this.fixedStringTable.matches(target, con.start, con.limit);
    Differences
    Expression1Expression2Difference
    char[]java.lang.StringVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type char[] of variable target does not match with type java.lang.String of variable target
    • Make classes char[] and java.lang.String extend a common superclass
    42
    int o = this.fixedStringTable.matches(target, con.start, con.limit);
    38
    if (o < 0)
    43
    if (o < 0)
    39
    con.inuse = false;
    44
    con.inuse = false;
    40
    return false;
    40
    return false;
    45
    return false;
    Preondition Violations
    Conditional return false;
    Conditional return false;
    45
    return false;
    Precondition Violations (3)
    Row Violation
    1Type char[] of variable target does not match with type java.lang.String of variable target
    2Conditional return false;
    3Conditional return false;