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
        }
Summary
Number of common nesting structure subtrees1
Number of refactorable cases0
Number of non-refactorable cases1
Time elapsed for finding largest common nesting structure subtrees (ms)0.2
Clones locationClones are in different classes
Number of node comparisons4
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements1
    Number of unmapped statements in the first code fragment1
    Number of unmapped statements in the second code fragment1
    Time elapsed for statement mapping (ms)0.6
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    if (treePath != null && values != null)
    1
    if (treePath != null && values != null)
    1
    if (file_load_recent_files != null && file != null)
    Differences
    Expression1Expression2Difference
    treePathfile_load_recent_filesVARIABLE_NAME_MISMATCH
    java.lang.Object[]java.util.ListVARIABLE_TYPE_MISMATCH
    valuesfileVARIABLE_NAME_MISMATCH
    java.lang.Object[]java.lang.StringVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type java.lang.Object[] of variable treePath does not match with type java.util.List of variable file_load_recent_files
    • Make classes java.lang.Object[] and java.util.List extend a common superclass
    Type java.lang.Object[] of variable values does not match with type java.lang.String of variable file
    • Make classes java.lang.Object[] and java.lang.String extend a common superclass
    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
    1Type java.lang.Object[] of variable treePath does not match with type java.util.List of variable file_load_recent_files
    2Type java.lang.Object[] of variable values does not match with type java.lang.String of variable file