this.fromStart = fromStart; this.fromEnd = NO_LIMIT; setEndPosition(fromEnd);
this.name = name; this.namePos = pos; setEndPosition(pos+name.length()-1);
Clone fragments detected by clone detection tool
File path: /sql12/app/src/net/sourceforge/squirrel_sql/client/session/parser/kernel/completions/SQLSelectStatement.java File path: /sql12/app/src/net/sourceforge/squirrel_sql/client/session/parser/kernel/completions/SQLColumn.java
Method name: void setFromStart(int) Method name: void setColumn(String, int)
Number of AST nodes: 3 Number of AST nodes: 3
1
this.fromStart = fromStart;
1
this.
2
        this.fromEnd = NO_LIMIT
2
name = name;
3
;
3
        this.namePos = pos;
4
        setEndPosition(fromEnd);
4
        setEndPosition(pos+name.length()-1);
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.0
Clones locationClones are in different classes having the same super class
Number of node comparisons6
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements2
    Number of unmapped statements in the first code fragment1
    Number of unmapped statements in the second code fragment1
    Time elapsed for statement mapping (ms)0.0
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
                                        
    1
    this.name = name;
    Preondition Violations
    Unmatched statement this.name=name; cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
    1
    this.name = name;
    1
    this.fromStart = fromStart;
    1
    this.fromStart = fromStart;
    2
    this.namePos = pos;
    Differences
    Expression1Expression2Difference
    fromStartnamePosVARIABLE_NAME_MISMATCH
    fromStartposVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression this.fromStart is a field being modified, and thus it cannot be parameterized
    Expression this.namePos is a field being modified, and thus it cannot be parameterized
    2
    this.namePos = pos;
    2
    this.fromEnd = NO_LIMIT;
    2
    this.fromEnd = NO_LIMIT;
    Preondition Violations
    Unmatched statement this.fromEnd=NO_LIMIT; cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
                                                      
    3
    setEndPosition(fromEnd);
    3
    setEndPosition(fromEnd);
    3
    setEndPosition(pos + name.length() - 1);
    Differences
    Expression1Expression2Difference
    fromEndpos + name.length() - 1TYPE_COMPATIBLE_REPLACEMENT
    Preondition Violations
    Expression fromEnd cannot be parameterized, because it has dependencies to/from statements that will be extracted
    3
    setEndPosition(pos + name.length() - 1);
    Precondition Violations (5)
    Row Violation
    1Unmatched statement this.name=name; cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
    2Expression this.fromStart is a field being modified, and thus it cannot be parameterized
    3Expression this.namePos is a field being modified, and thus it cannot be parameterized
    4Unmatched statement this.fromEnd=NO_LIMIT; cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
    5Expression fromEnd cannot be parameterized, because it has dependencies to/from statements that will be extracted