File path: /jEdit-4.2/src/org/gjt/sp/jedit/View.java | File path: /jEdit-4.2/src/org/gjt/sp/jedit/View.java | |||
Method name: void nextTextArea()
|
Method name: void prevTextArea()
|
|||
Number of AST nodes: 6 | Number of AST nodes: 6 | |||
1 | for(int i = 0; i < editPanes.length; i++)↵ | 1 | for(int i = 0; i < editPanes.length; i++)↵ | |
2 | {↵ | 2 | {↵ | |
3 | if(editPane == editPanes[i])↵ | 3 | if(editPane == editPanes[i])↵ | |
4 | {↵ | 4 | {↵ | |
5 | if(i == ↵ | 5 | if(i == 0)↵ | |
6 | editPanes.length - 1)↵ | 6 | editPanes[editPanes.length - 1↵ | |
7 | editPanes[0].focusOnTextArea();↵ | 7 | ].focusOnTextArea();↵ | |
8 | else↵ | 8 | else↵ | |
9 | editPanes[i+1].focusOnTextArea();↵ | 9 | editPanes[i-1].focusOnTextArea();↵ | |
10 | break;↵ | 10 | break;↵ | |
11 | }↵ | 11 | }↵ | |
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) | 0.4 |
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 | 1 |
Number of unmapped statements in the second code fragment | 1 |
Time elapsed for statement mapping (ms) | 1.4 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
2 | for (int i = 0; i < editPanes.length; i++) | 2 | for (int i = 0; i < editPanes.length; i++) | |||||||||||
3 | if (editPane == editPanes[i]) | 3 | if (editPane == editPanes[i]) | |||||||||||
4 | if (i == editPanes.length - 1) |
| 4 | if (i == 0) | ||||||||||
5 | editPanes[0].focusOnTextArea(); |
| 5 | editPanes[editPanes.length - 1].focusOnTextArea(); | ||||||||||
else | | |||||||||||||
|
| 6 | editPanes[i - 1].focusOnTextArea(); | |||||||||||
6 | editPanes[i + 1].focusOnTextArea(); |
| | |||||||||||
7 | break; | 7 | break; |
Row | Violation |
---|---|
1 | Unmatched statement editPanes[i - 1].focusOnTextArea(); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
2 | Unmatched statement editPanes[i + 1].focusOnTextArea(); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |