if (max == 0)
{
item = new JMenuItem(jEdit.getProperty("MacOSPlugin.menu.recentDir.none"));
item.setEnabled(false);
add(item);
return;
}
if (max == 0)
{
item = new JMenuItem(jEdit.getProperty("MacOSPlugin.menu.recent.none"));
item.setEnabled(false);
add(item);
return;
}
Clone fragments detected by clone detection tool
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: 5
|
|
Number of AST nodes: 5
|
|
1 | if (max == 0)↵ | | 1 | if (max == 0)↵
|
2 | {↵ | | 2 | {↵
|
3 | item = new JMenuItem(jEdit.getProperty("MacOSPlugin.menu.recentDir.none"));↵ | | 3 | item = new JMenuItem(jEdit.getProperty("MacOSPlugin.menu.recent.none"));↵
|
4 | item.setEnabled(false);↵ | | 4 | item.setEnabled(false);↵
|
5 | add(item);↵ | | 5 | add(item);↵
|
6 | return;↵ | | 6 | return;↵
|
7 | } | | 7 | }
|
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.1 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 25 |
-
{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) | 1.5 |
Clone type | Type 2 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
5 | if (max == 0) | | 6 | if (max == 0) |
6 | item = new JMenuItem(jEdit.getProperty("MacOSPlugin.menu.recentDir.none")); | | 7 | item = new JMenuItem(jEdit.getProperty("MacOSPlugin.menu.recent.none")); |
7 | | | 8 | |
8 | | | 9 | |
9 | | | 10 | |
Precondition Violations (2)
Row |
Violation |
1 | Conditional return; |
2 | Conditional return; |