file = new File(model.getItem(i));
item = new NSMenuItem(file.getName(),actionSel,"");
item.setTarget(new ShowFileAction(file.getPath()));
if (!file.exists())
item.setEnabled(false);
addItem(item);
file = new File(((BufferHistory.Entry)recent.get(i)).path);
item = new NSMenuItem(file.getName(),actionSel,"");
item.setTarget(new ShowFileAction(file.getPath()));
if (!file.exists())
item.setEnabled(false);
addItem(item);
Clone fragments detected by clone detection tool
File path: /jEdit-4.2/jars/MacOS/macos/Delegate.java
|
|
File path: /jEdit-4.2/jars/MacOS/macos/Delegate.java
|
Method name: void updateMenu()
|
|
Method name: void updateMenu()
|
Number of AST nodes: 6
|
|
Number of AST nodes: 6
|
|
1 | file = new File(model.getItem(i));↵ | | 1 | file = new File(((BufferHistory.Entry)recent.get(i)).path);↵
|
2 | item = new NSMenuItem(file.getName(),actionSel,"");↵ | | 2 | item = new NSMenuItem(file.getName(),actionSel,"");↵
|
3 | item.setTarget(new ShowFileAction(file.getPath()));↵ | | 3 | item.setTarget(new ShowFileAction(file.getPath()));↵
|
4 | if (!file.exists())↵ | | 4 | if (!file.exists())↵
|
5 | item.setEnabled(false);↵ | | 5 | item.setEnabled(false);↵
|
6 | addItem(item); | | 6 | addItem(item);
|
See real code fragment |
|
See real code fragment |
Summary
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 1 |
Number of non-refactorable cases | 0 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.2 |
Clones location | Clones are in the same java file |
Number of node comparisons | 21 |
-
{Refactorable}
Mapping Summary
Number of mapped statements | 6 |
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) | 3.4 |
Clone type | Type 2 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
14 | file = new File(model.getItem(i)); | | 17 | file = new File(((BufferHistory.Entry)recent.get(i)).path); |
15 | item = new NSMenuItem(file.getName(), actionSel, ""); | | 18 | item = new NSMenuItem(file.getName(), actionSel, ""); |
16 | item.setTarget(new ShowFileAction(file.getPath())); | | 19 | item.setTarget(new ShowFileAction(file.getPath())); |
17 | if (!file.exists()) | | 20 | if (!file.exists()) |
18 | | | 21 | |
19 | addItem(item); | | 22 | addItem(item); |
Precondition Violations (0)
Row |
Violation |