path.add(pane);
TreePath treePath = new TreePath(
path.toArray());
paneTree.scrollPathToVisible(treePath);
paneTree.setSelectionPath(treePath);
return true;
path.add(pane);
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: 5
|
|
Number of AST nodes: 5
|
|
1 | path.add(pane);↵ | | 1 | path.add(pane);↵
|
2 | TreePath treePath = new TreePath(↵ | | 2 | TreePath treePath = new TreePath(↵
|
3 | path.toArray());↵ | | 3 | path.toArray());↵
|
4 | paneTree.scrollPathToVisible(treePath);↵ | | 4 | paneTree.scrollPathToVisible(treePath);↵
|
5 | paneTree.setSelectionPath(treePath);↵ | | 5 | paneTree.setSelectionPath(treePath);↵
|
6 | return true; | | 6 | 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 | 18 |
-
{Non-refactorable}
Mapping Summary
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) | 0.0 |
Clone type | Type 2 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
27 | path.add(pane); | | 19 | path.add(pane); |
28 | TreePath treePath = new TreePath(path.toArray()); | | 20 | TreePath treePath = new TreePath(path.toArray()); |
29 | paneTree.scrollPathToVisible(treePath); | | 21 | paneTree.scrollPathToVisible(treePath); |
30 | paneTree.setSelectionPath(treePath); | | 22 | paneTree.setSelectionPath(treePath); |
31 | return true; | | 23 | return true; |
Precondition Violations (3)
Row |
Violation |
1 | Type java.lang.String of variable pane does not match with type org.gjt.sp.jedit.OptionPane of variable pane |
2 | Conditional return true; |
3 | Conditional return true; |