logicalLength++; if(!lastWasSpace && logicalLength <= maxLineLen) { lastInLine = i; lastWordOffset = i; lastWasSpace = true; }
logicalLength++; if(!lastWasSpace && logicalLength <= maxLineLen + 1) { lastInLine = i; lastWordOffset = i; lastWasSpace = true; }
Clone fragments detected by clone detection tool
File path: /jEdit-4.2/src/org/gjt/sp/jedit/textarea/JEditTextArea.java File path: /jEdit-4.2/src/org/gjt/sp/jedit/textarea/JEditTextArea.java
Method name: boolean doWordWrap(boolean) Method name: boolean doWordWrap(boolean)
Number of AST nodes: 5 Number of AST nodes: 5
1
logicalLength++;
1
logicalLength++;
2
				if(!lastWasSpace && 
2
				if(!lastWasSpace &&
3
logicalLength <= maxLineLen)
3
					logicalLength <= maxLineLen + 1)
4
				{
4
				{
5
					lastInLine = i;
5
					lastInLine = i;
6
					lastWordOffset = i;
6
					lastWordOffset = i;
7
					lastWasSpace = true;
7
					lastWasSpace = true;
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.4
Clones locationClones are in the same method
Number of node comparisons19
  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)2.5
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    33
    logicalLength++;
    27
    logicalLength++;
    34
    if (!lastWasSpace && logicalLength <= maxLineLen)
    34
    if (!lastWasSpace && logicalLength <= maxLineLen)
    28
    if (!lastWasSpace && logicalLength <= maxLineLen + 1)
    Differences
    Expression1Expression2Difference
    maxLineLenmaxLineLen + 1INFIX_RIGHT_OPERAND_MISMATCH
    28
    if (!lastWasSpace && logicalLength <= maxLineLen + 1)
    35
    lastInLine = i;
    29
    lastInLine = i;
    36
    lastWordOffset = i;
    30
    lastWordOffset = i;
    37
    lastWasSpace = true;
    31
    lastWasSpace = true;
    Precondition Violations (1)
    Row Violation
    1Clone fragment #1 returns variables logicalLength, lastWasSpace, lastInLine, lastWordOffset , while Clone fragment #2 returns variables logicalLength, lastWasSpace, lastInLine, lastWordOffset