if (treePath != null && values != null) {
set(Arrays.asList(treePath), Arrays.asList(values));
}
if(file_load_recent_files != null && file != null) {
LoadRecentProject.updateRecentFileMenuItems(file_load_recent_files, file);
}
Clone fragments detected by clone detection tool
File path: /jakarta-jmeter-2.3.2/src/org/apache/jorphan/collections/HashTree.java
|
|
File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/gui/util/JMeterMenuBar.java
|
Method name: void set(Object[], Object[])
|
|
Method name: void setProjectFileLoaded(String)
|
Number of AST nodes: 2
|
|
Number of AST nodes: 2
|
|
1 | if (treePath != null && values != null) {↵ | | 1 | if(file_load_recent_files != null && file != null) {↵
|
2 | set(Arrays.asList(treePath), Arrays.asList(values));↵ | | |
|
3 | ↵ | | 2 | LoadRecentProject.updateRecentFileMenuItems(file_load_recent_files, file);↵
|
4 | } | | 3 | }
|
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.2 |
Clones location | Clones are in different classes |
Number of node comparisons | 4 |
-
{Non-refactorable}
Mapping Summary
Number of mapped statements | 1 |
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.6 |
Clone type | Type 2 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
1 | if (treePath != null && values != null) | | 1 | if (file_load_recent_files != null && file != null) |
| | | 2 | LoadRecentProject.updateRecentFileMenuItems(file_load_recent_files, file); |
2 | set(Arrays.asList(treePath), Arrays.asList(values)); | | | |
Precondition Violations (2)
Row |
Violation |
1 | Type java.lang.Object[] of variable treePath does not match with type java.util.List of variable file_load_recent_files |
2 | Type java.lang.Object[] of variable values does not match with type java.lang.String of variable file |