item = new NSMenuItem(file.getName(),actionSel,"");
item.setTarget(new ShowFileAction(file.getPath()));
if (!file.exists())
item.setEnabled(false);
addItem(item);
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: 5
|
|
Number of AST nodes: 5
|
|
1 | item = new NSMenuItem(file.getName(),actionSel,"");↵ | | 1 | item = new NSMenuItem(file.getName(),actionSel,"");↵
|
2 | item.setTarget(new ShowFileAction(file.getPath()));↵ | | 2 | item.setTarget(new ShowFileAction(file.getPath()));↵
|
3 | if (!file.exists())↵ | | 3 | if (!file.exists())↵
|
4 | item.setEnabled(false);↵ | | 4 | item.setEnabled(false);↵
|
5 | addItem(item); | | 5 | 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.3 |
Clones location | Clones are in the same java file |
Number of node comparisons | 14 |
-
{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) | 1.8 |
Clone type | Type 1 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
18 | item = new NSMenuItem(file.getName(), actionSel, ""); | | 15 | item = new NSMenuItem(file.getName(), actionSel, ""); |
19 | item.setTarget(new ShowFileAction(file.getPath())); | | 16 | item.setTarget(new ShowFileAction(file.getPath())); |
20 | if (!file.exists()) | | 17 | if (!file.exists()) |
21 | | | 18 | |
22 | addItem(item); | | 19 | addItem(item); |
Precondition Violations (0)
Row |
Violation |