ChunkCache.LineInfo info = chunkCache.getLineInfo(i); if((info.physicalLine >= line || info.physicalLine == -1) && startLine == -1) { startLine = i; } if((info.physicalLine >= line && info.lastSubregion) || info.physicalLine == -1) { endLine = i; break; }
ChunkCache.LineInfo info = chunkCache.getLineInfo(i); if((info.physicalLine >= start || info.physicalLine == -1) && startScreenLine == -1) { startScreenLine = i; } if((info.physicalLine >= end && info.lastSubregion) || info.physicalLine == -1) { endScreenLine = i; break; }
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: void invalidateLine(int) Method name: void invalidateLineRange(int, int)
Number of AST nodes: 6 Number of AST nodes: 6
1
ChunkCache.LineInfo info = chunkCache.getLineInfo(i);
1
ChunkCache.LineInfo info = chunkCache.getLineInfo(i);
2
			if((info.physicalLine >= line || info.physicalLine == -1)
2
			if((info.physicalLine >= start || info.physicalLine == -1)
3
				&& startLine == -1)
3
				&& startScreenLine == -1)
4
			{
4
			{
5
				startLine = i;
5
				startScreenLine = i;
6
			}
6
			}
7
			if((info.physicalLine >= line && info.lastSubregion)
7
			if((info.physicalLine >= end && info.lastSubregion)
8
				|| info.physicalLine == -1)
8
				|| info.physicalLine == -1)
9
			{
9
			{
10
				endLine = i;
10
				endScreenLine = i;
11
				break;
11
				break;
12
			}
12
			}
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)2.2
Clones locationClones are declared in the same class
Number of node comparisons22
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements6
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)9.3
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    6
    ChunkCache.LineInfo info = chunkCache.getLineInfo(i);
    12
    ChunkCache.LineInfo info = chunkCache.getLineInfo(i);
    7
    if ((info.physicalLine >= line || info.physicalLine == -1) && startLine == -1)
    7
    if ((info.physicalLine >= line || info.physicalLine == -1) && startLine == -1)
    13
    if ((info.physicalLine >= start || info.physicalLine == -1) && startScreenLine == -1)
    Differences
    Expression1Expression2Difference
    linestartVARIABLE_NAME_MISMATCH
    startLinestartScreenLineVARIABLE_NAME_MISMATCH
    13
    if ((info.physicalLine >= start || info.physicalLine == -1) && startScreenLine == -1)
    8
    startLine = i;
    8
    startLine = i;
    14
    startScreenLine = i;
    Differences
    Expression1Expression2Difference
    startLinestartScreenLineVARIABLE_NAME_MISMATCH
    14
    startScreenLine = i;
    9
    if ((info.physicalLine >= line && info.lastSubregion) || info.physicalLine == -1)
    9
    if ((info.physicalLine >= line && info.lastSubregion) || info.physicalLine == -1)
    15
    if ((info.physicalLine >= end && info.lastSubregion) || info.physicalLine == -1)
    Differences
    Expression1Expression2Difference
    lineendVARIABLE_NAME_MISMATCH
    15
    if ((info.physicalLine >= end && info.lastSubregion) || info.physicalLine == -1)
    10
    endLine = i;
    10
    endLine = i;
    16
    endScreenLine = i;
    Differences
    Expression1Expression2Difference
    endLineendScreenLineVARIABLE_NAME_MISMATCH
    16
    endScreenLine = i;
    11
    break;
    11
    break;
    17
    break;
    Preondition Violations
    Statement break; without innermost loop
    Statement break; without innermost loop
    17
    break;
    Precondition Violations (3)
    Row Violation
    1Statement break; without innermost loop
    2Statement break; without innermost loop
    3Clone fragment #1 returns variables endLine, startLine , while Clone fragment #2 returns variables startScreenLine, endScreenLine