File path: /jEdit-4.2/src/org/gjt/sp/jedit/gui/OptionsDialog.java | File path: /jEdit-4.2/src/org/gjt/sp/jedit/gui/OptionsDialog.java | |||
Method name: boolean selectPane(OptionGroup, String, ArrayList)
|
Method name: boolean selectPane(OptionGroup, String, ArrayList)
|
|||
Number of AST nodes: 6 | Number of AST nodes: 5 | |||
1 | path.add(grp);↵ | 1 | path.add(↵ | |
2 | path.add(grp.getMember(0));↵ | 2 | pane);↵ | |
3 | TreePath treePath = new TreePath(↵ | 3 | TreePath treePath = new TreePath(↵ | |
4 | path.toArray());↵ | 4 | path.toArray());↵ | |
5 | paneTree.scrollPathToVisible(treePath);↵ | 5 | paneTree.scrollPathToVisible(treePath);↵ | |
6 | paneTree.setSelectionPath(treePath);↵ | 6 | paneTree.setSelectionPath(treePath);↵ | |
7 | return true; | 7 |
| |
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.0 |
Clones location | Clones are in the same method |
Number of node comparisons | 22 |
Number of mapped statements | 5 |
Number of unmapped statements in the first code fragment | 1 |
Number of unmapped statements in the second code fragment | 0 |
Time elapsed for statement mapping (ms) | 0.0 |
Clone type | Type 3 |
ID | Statement | ID | Statement | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
8 | path.add(grp); |
| 27 | path.add(pane); | ||||||||||||||
9 | path.add(grp.getMember(0)); |
| | |||||||||||||||
10 | TreePath treePath = new TreePath(path.toArray()); | 28 | TreePath treePath = new TreePath(path.toArray()); | |||||||||||||||
11 | paneTree.scrollPathToVisible(treePath); | 29 | paneTree.scrollPathToVisible(treePath); | |||||||||||||||
12 | paneTree.setSelectionPath(treePath); | 30 | paneTree.setSelectionPath(treePath); | |||||||||||||||
13 | return true; |
| 31 | return true; |
Row | Violation |
---|---|
1 | Type org.gjt.sp.jedit.OptionGroup of variable grp does not match with type java.lang.String of variable pane |
2 | Unmatched statement path.add(grp.getMember(0)); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
3 | Conditional return true; |
4 | Conditional return true; |