if(Character.isWhitespace(getDocument().getText(startPos-1,1).charAt(0))) { break; }
if( !Character.isWhitespace(toTrim.charAt(i-1)) ) { break; }
Clone fragments detected by clone detection tool
File path: /sql12/plugins/syntax/src/net/sourceforge/squirrel_sql/plugins/syntax/oster/OsterTextControl.java File path: /sql12/plugins/editextras/src/net/sourceforge/squirrel_sql/plugins/editextras/Utilities.java
Method name: int getColorStartPos(RecolorEvent) Method name: String trimRight(String)
Number of AST nodes: 2 Number of AST nodes: 2
1
if(Character.isWhitespace(getDocument().getText(startPos-1,1).charAt(0)))
1
if( !Character.isWhitespace(toTrim.charAt(
2
i-1)) ) 
2
               {
3
			{                    
3
                  
4
                             
4
break;
5
				break;
5
               
6
                                        
6
}
7
			}
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.8
Clones locationClones are in different classes
Number of node comparisons5
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements2
    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.8
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    6
    if (Character.isWhitespace(getDocument().getText(startPos - 1, 1).charAt(0)))
    6
    if (Character.isWhitespace(getDocument().getText(startPos - 1, 1).charAt(0)))
    5
    if (!Character.isWhitespace(toTrim.charAt(i - 1)))
    Differences
    Expression1Expression2Difference
    Character.isWhitespace(getDocument().getText(startPos - 1,1).charAt(0))!Character.isWhitespace(toTrim.charAt(i - 1))TYPE_COMPATIBLE_REPLACEMENT
    5
    if (!Character.isWhitespace(toTrim.charAt(i - 1)))
    7
    break;
    7
    break;
    6
    break;
    Preondition Violations
    Statement break; without innermost loop
    Statement break; without innermost loop
    6
    break;
    Precondition Violations (3)
    Row Violation
    1Statement break; without innermost loop
    2Statement break; without innermost loop
    3The refactoring of the clones is infeasible, because classes net.sourceforge.squirrel_sql.plugins.syntax.oster.OsterTextControl.Colorer and net.sourceforge.squirrel_sql.plugins.editextras.Utilities do not have a common superclass