if (parent instanceof Controller && (child instanceof Sampler || child instanceof Controller)) { parent.addTestElement(child); }
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/jmeter/threads/TestCompiler.java File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/gui/util/JMeterMenuBar.java
Method name: void addTestElements() Method name: void setProjectFileLoaded(String)
Number of AST nodes: 2 Number of AST nodes: 2
1
if (parent instanceof Controller && (child instanceof Sampler || child instanceof Controller)) {
1
if
2
				parent.addTestE
2
(file_load_recent_files != null && file != null) {
3
lement(child);
3
            LoadRecentProject.updateRecentFileMenuItems(file_load_recent_files, file);
4
			}
4
        }
Summary
Number of common nesting structure subtrees1
Number of refactorable cases1
Number of non-refactorable cases0
Time elapsed for finding largest common nesting structure subtrees (ms)0.1
Clones locationClones are in different classes
Number of node comparisons4
  1. {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.4
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    if (parent instanceof Controller && (child instanceof Sampler || child instanceof Controller))
    1
    if (parent instanceof Controller && (child instanceof Sampler || child instanceof Controller))
    1
    if (file_load_recent_files != null && file != null)
    Differences
    Expression1Expression2Difference
    parent instanceof Controllerfile_load_recent_files != nullINFIX_LEFT_OPERAND_MISMATCH
    (child instanceof Sampler || child instanceof Controller)file != nullINFIX_RIGHT_OPERAND_MISMATCH
    1
    if (file_load_recent_files != null && file != null)
                                                                                                                                                            
    2
    LoadRecentProject.updateRecentFileMenuItems(file_load_recent_files, file);
    2
    parent.addTestElement(child);
                                                                    
    Precondition Violations (0)
    Row Violation