File path: /jEdit-4.2/src/org/gjt/sp/jedit/gui/FilesChangedDialog.java | File path: /jEdit-4.2/src/org/gjt/sp/jedit/pluginmgr/Roster.java | |||
Method name: void selectAll()
|
Method name: boolean deleteRecursively(File)
|
|||
Number of AST nodes: 4 | Number of AST nodes: 4 | |||
1 | for(int j = 0; j < node.getChildCount(); j++)↵ | |||
2 | {↵ | |||
3 | DefaultMutableTreeNode node2 =↵ | |||
4 | (DefaultMutableTreeNode)↵ | |||
5 | node.getChildA↵ | 1 | String path = file.getPath();↵ | |
6 | t(j);↵ | 2 | String[] children = file.list();↵ | |
7 | path[2] = node2;↵ | 3 | ↵ | |
8 | bufferTree.getSelectionModel()↵ | |||
9 | .addSelectionPath(↵ | |||
10 | new TreePath(path↵ | 4 | for(int i = 0; i < children.length; i++)↵ | |
5 | {↵ | |||
11 | ));↵ | 6 | ok &= deleteRecursively(new File(path,children[i]));↵ | |
12 | } | 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.2 |
Clones location | Clones are in different classes |
Number of node comparisons | 10 |
Number of mapped statements | 1 |
Number of unmapped statements in the first code fragment | 3 |
Number of unmapped statements in the second code fragment | 3 |
Time elapsed for statement mapping (ms) | 1.0 |
Clone type | Type 3 |
ID | Statement | ID | Statement | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 4 | String path = file.getPath(); | |||||||||||||||||||||
| 5 | String[] children = file.list(); | |||||||||||||||||||||
7 | for (int j = 0; j < node.getChildCount(); j++) |
| 6 | for (int i = 0; i < children.length; i++) | |||||||||||||||||||
|
| 7 | ok &= deleteRecursively(new File(path, children[i])); | ||||||||||||||||||||
8 | DefaultMutableTreeNode node2 = (DefaultMutableTreeNode)node.getChildAt(j); |
| | ||||||||||||||||||||
9 | path[2] = node2; |
| | ||||||||||||||||||||
10 | bufferTree.getSelectionModel().addSelectionPath(new TreePath(path)); | |
Row | Violation |
---|---|
1 | Unmatched statement ok&=deleteRecursively(new File(path,children[i])); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
2 | Unmatched statement DefaultMutableTreeNode node2=(DefaultMutableTreeNode)node.getChildAt(j); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
3 | Unmatched statement path[2]=node2; cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |