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 goToParentFold()
|
Method name: void goToPrevFold(boolean)
|
|||
Number of AST nodes: 5 | Number of AST nodes: 5 | |||
1 | if(line == -1)↵ | 1 | if(prevFold == -1)↵ | |
2 | {↵ | 2 | {↵ | |
3 | getToolkit().beep();↵ | 3 | getToolkit().beep();↵ | |
4 | return;↵ | 4 | return;↵ | |
5 | }↵ | 5 | }↵ | |
6 | int magic = getMagicCaretPosition();↵ | 6 | int magic = getMagicCaretPosition();↵ | |
7 | int newCaret = buffer.getLineStartOffset(line)↵ | 7 | int newCaret = buffer.getLineStartOffset(prevFold)↵ | |
8 | + chunkCache.xToSubregionOffset(line,0,magic + 1,true); | 8 | + chunkCache.xToSubregionOffset(prevFold,0,magic + 1,true); | |
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) | 0.2 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 14 |
Number of mapped statements | 5 |
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) | 70.2 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
7 | if (line == -1) |
| 6 | if (prevFold == -1) | |||||||||||||
8 | getToolkit().beep(); | 7 | getToolkit().beep(); | ||||||||||||||
9 | return; |
| 8 | return; | |||||||||||||
10 | int magic = getMagicCaretPosition(); | 9 | int magic = getMagicCaretPosition(); | ||||||||||||||
11 | int newCaret = buffer.getLineStartOffset(line) + chunkCache.xToSubregionOffset(line, 0, magic + 1, true); |
| 10 | int newCaret = buffer.getLineStartOffset(prevFold) + chunkCache.xToSubregionOffset(prevFold, 0, magic + 1, true); |
Row | Violation |
---|---|
1 | Conditional return; |
2 | Conditional return; |
3 | Clone fragment #1 returns variables newCaret, magic , while Clone fragment #2 returns variables newCaret, magic |