File path: /jEdit-4.2/jars/MacOS/macos/menu/ShowRecentDirMenu.java | File path: /jEdit-4.2/jars/MacOS/macos/menu/ShowRecentMenu.java | |||
Method name: void construct()
|
Method name: void construct()
|
|||
Number of AST nodes: 4 | Number of AST nodes: 4 | |||
1 | file = new File(model.getItem(i));↵ | 1 | file = new File(((BufferHistory.Entry)recent.get(i)).path);↵ | |
2 | item = new ShowRecentDirMenuItem(file.getName(),file.getPath());↵ | 2 | item = new ShowRecentMenuItem(file.getName(),file.getPath());↵ | |
3 | item.setIcon(FileCellRenderer.dirIcon);↵ | 3 | item.setIcon(FileCellRenderer.fileIcon);↵ | |
4 | add(item); | 4 |
| |
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 different classes having the same super class |
Number of node comparisons | 17 |
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 2 |
ID | Statement | ID | Statement | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
11 | file = new File(model.getItem(i)); |
| 14 | file = new File(((BufferHistory.Entry)recent.get(i)).path); | ||||||||||||
12 | item = new ShowRecentDirMenuItem(file.getName(), file.getPath()); |
| 15 | item = new ShowRecentMenuItem(file.getName(), file.getPath()); | ||||||||||||
13 | item.setIcon(FileCellRenderer.dirIcon); |
| 16 | item.setIcon(FileCellRenderer.fileIcon); | ||||||||||||
14 | add(item); | 17 | add(item); |
Row | Violation |
---|---|
1 | Expression new ShowRecentDirMenuItem(file.getName(),file.getPath()) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Expression new ShowRecentMenuItem(file.getName(),file.getPath()) cannot be parameterized, because it has dependencies to/from statements that will be extracted |