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 |
| |
See real code fragment | See real code fragment |
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 0 |
Number of non-refactorable cases | 1 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 2.2 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 22 |
Number of mapped statements | 6 |
Number of unmapped statements in the first code fragment | 0 |
Number of unmapped statements in the second code fragment | 0 |
Time elapsed for statement mapping (ms) | 9.3 |
Clone type | Type 2 |
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) |
| 13 | if ((info.physicalLine >= start || info.physicalLine == -1) && startScreenLine == -1) | |||||||||||||
8 | startLine = i; |
| 14 | startScreenLine = i; | |||||||||||||
9 | if ((info.physicalLine >= line && info.lastSubregion) || info.physicalLine == -1) |
| 15 | if ((info.physicalLine >= end && info.lastSubregion) || info.physicalLine == -1) | |||||||||||||
10 | endLine = i; |
| 16 | endScreenLine = i; | |||||||||||||
11 | break; |
| 17 | break; |
Row | Violation |
---|---|
1 | Statement break; without innermost loop |
2 | Statement break; without innermost loop |
3 | Clone fragment #1 returns variables endLine, startLine , while Clone fragment #2 returns variables startScreenLine, endScreenLine |