List recent = BufferHistory.getHistory();
NSMenuItem item;
File file;
int max = recent.size();
int min = max - 20;
List recent = BufferHistory.getHistory();
JMenuItem item;
File file;
int max = recent.size();
int min = max - 20;
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/menu/ShowRecentMenu.java
|
Method name: void updateMenu()
|
|
Method name: void construct()
|
Number of AST nodes: 5
|
|
Number of AST nodes: 5
|
|
1 | List recent = BufferHistory.getHistory();↵ | | 1 | List recent = BufferHistory.getHistory();↵
|
2 | NSMenuItem item;↵ | | 2 | JMenuItem item;↵
|
3 | File file;↵ | | 3 | File file;↵
|
4 | int max = recent.size();↵ | | 4 | int max = recent.size();↵
|
5 | int min = max - 20; | | 5 | int min = max - 20;
|
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.0 |
Clones location | Clones are in different classes |
Number of node comparisons | 26 |
-
{Non-refactorable}
Mapping Summary
Number of mapped statements | 4 |
Number of unmapped statements in the first code fragment | 1 |
Number of unmapped statements in the second code fragment | 1 |
Time elapsed for statement mapping (ms) | 0.0 |
Clone type | Type 2 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
1 | List recent = BufferHistory.getHistory(); | | 1 | List recent = BufferHistory.getHistory(); |
| | | 2 | JMenuItem item; |
2 | NSMenuItem item; | | | |
3 | File file; | | 3 | File file; |
4 | int max = recent.size(); | | 4 | int max = recent.size(); |
5 | int min = max - 20; | | 5 | int min = max - 20; |
Precondition Violations (1)
Row |
Violation |
1 | Clone fragment #1 returns variables max, min, recent, file , while Clone fragment #2 returns variables max, min, recent, file |