++newLinteCount; if(2 == newLinteCount) { return ix+newLinteCount; }
++newLinteCount; if(2 == newLinteCount) { return ix-1; }
Clone fragments detected by clone detection tool
File path: /sql12/app/src/net/sourceforge/squirrel_sql/client/session/BaseSQLEntryPanel.java File path: /sql12/app/src/net/sourceforge/squirrel_sql/client/session/BaseSQLEntryPanel.java
Method name: int lastIndexOfStateSep(String, int) Method name: int indexOfStateSep(String, int)
Number of AST nodes: 3 Number of AST nodes: 3
1
++newLinteCount;
1
++newLinteCount;
2
            if(2 == newLinteCount)
2
            if(2 == newLinteCount)
3
            {
3
            {
4
               return ix+newLinteCount;
4
               return ix-1;
5
            }
5
            }
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 comparisons7
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements3
    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.1
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    11
    ++newLinteCount;
    9
    ++newLinteCount;
    12
    if (2 == newLinteCount)
    10
    if (2 == newLinteCount)
    13
    return ix + newLinteCount;
    13
    return ix + newLinteCount;
    11
    return ix - 1;
    Differences
    Expression1Expression2Difference
    newLinteCount1TYPE_COMPATIBLE_REPLACEMENT
    +-OPERATOR_MISMATCH
    Preondition Violations
    Expression newLinteCount cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression ix + newLinteCount cannot be parameterized, because it has dependencies to/from statements that will be extracted
    11
    return ix - 1;
    Precondition Violations (3)
    Row Violation
    1Expression newLinteCount cannot be parameterized, because it has dependencies to/from statements that will be extracted
    2Expression ix + newLinteCount cannot be parameterized, because it has dependencies to/from statements that will be extracted
    3Not all possible execution flows end in a return statement