if(Character.isWhitespace(name.charAt(i))) { return true; }
if(Character.isWhitespace(text.charAt(retPos))) { return retPos; }
Clone fragments detected by clone detection tool
File path: /sql12/plugins/sqlbookmark/src/net/sourceforge/squirrel_sql/plugins/sqlbookmark/BookmarEditController.java File path: /sql12/plugins/hibernate/src/net/sourceforge/squirrel_sql/plugins/hibernate/completion/HQLCompleteCodeAction.java
Method name: boolean containsWhiteSpaces(String) Method name: int getNextWhiteSpacePos(int)
Number of AST nodes: 2 Number of AST nodes: 2
1
if(Character.isWhitespace(name.charAt(i)))
1
if(Character.isWhitespace(text.charAt(
2
         {
3
            return true;
4
         
2
retPos)))
3
			{
4
				return retPos;
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.5
Clones locationClones are in different classes
Number of node comparisons5
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements1
    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.6
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    2
    if (Character.isWhitespace(name.charAt(i)))
    2
    if (Character.isWhitespace(name.charAt(i)))
    4
    if (Character.isWhitespace(text.charAt(retPos)))
    Differences
    Expression1Expression2Difference
    iretPosVARIABLE_NAME_MISMATCH
    nametextVARIABLE_NAME_MISMATCH
    4
    if (Character.isWhitespace(text.charAt(retPos)))
    3
    return true;
    3
    return true;
    Preondition Violations
    Unmatched return true;
                                  
                                      
    5
    return retPos;
    Preondition Violations
    Unmatched statement return retPos; cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
    Unmatched return retPos;
    5
    return retPos;
    Precondition Violations (4)
    Row Violation
    1Unmatched return true;
    2Unmatched statement return retPos; cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
    3Unmatched return retPos;
    4The refactoring of the clones is infeasible, because the number of macthed statements is equal to zero