TreePath treePath = new TreePath(
path.toArray());
paneTree.scrollPathToVisible(treePath);
paneTree.setSelectionPath(treePath);
return true;
TreePath treePath = new TreePath(
path.toArray());
paneTree.scrollPathToVisible(treePath);
paneTree.setSelectionPath(treePath);
return true;
Clone fragments detected by clone detection tool
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: 4
|
|
Number of AST nodes: 4
|
|
1 | TreePath treePath = new TreePath(↵ | | 1 | TreePath treePath = new TreePath(↵
|
2 | path.toArray());↵ | | 2 | path.toArray());↵
|
3 | paneTree.scrollPathToVisible(treePath);↵ | | 3 | paneTree.scrollPathToVisible(treePath);↵
|
4 | paneTree.setSelectionPath(treePath);↵ | | 4 | paneTree.setSelectionPath(treePath);↵
|
5 | return true; | | 5 | return true;
|
See real code fragment |
|
See real code fragment |
Summary
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 | 11 |
-
{Non-refactorable}
Mapping Summary
Number of mapped statements | 4 |
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) | 0.0 |
Clone type | Type 1 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
10 | TreePath treePath = new TreePath(path.toArray()); | | 20 | TreePath treePath = new TreePath(path.toArray()); |
11 | paneTree.scrollPathToVisible(treePath); | | 21 | paneTree.scrollPathToVisible(treePath); |
12 | paneTree.setSelectionPath(treePath); | | 22 | paneTree.setSelectionPath(treePath); |
13 | return true; | | 23 | return true; |
Precondition Violations (2)
Row |
Violation |
1 | Conditional return true; |
2 | Conditional return true; |