RecordingController con = new RecordingController(); this.configureTestElement(con); return con;
sampler.clear(); ((LDAPSampler) sampler).addTestElement(ldapDefaultPanel.createTestElement()); ((LDAPSampler) sampler).addTestElement(loginPanel.createTestElement()); this.configureTestElement(sampler);
Clone fragments detected by clone detection tool
File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/protocol/http/control/gui/RecordController.java File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/protocol/ldap/control/gui/LdapTestSamplerGui.java
Method name: TestElement createTestElement() Method name: void modifyTestElement(TestElement)
Number of AST nodes: 3 Number of AST nodes: 4
1
RecordingController con = new RecordingController
1
sampler.clear();
2
		((LDAPSampler) sampler).addTestElement(ldapDefaultPanel.createTestElement());
2
();
3
		((LDAPSampler) sampler).addTestElement(loginPanel.createTestElement());
3
		this.configureTestElement(con);
4
		this.configureTestElement(
4
		return con;
5
sampler);
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.0
Clones locationClones are in different classes having the same super class
Number of node comparisons12
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements1
    Number of unmapped statements in the first code fragment2
    Number of unmapped statements in the second code fragment3
    Time elapsed for statement mapping (ms)0.0
    Clone typeType 3
    Mapped Statements
    ID Statement ID Statement
                                          
    1
    sampler.clear();
    1
    RecordingController con = new RecordingController();
                                                                                                              
                                                                                                                                                                  
    2
    ((LDAPSampler)sampler).addTestElement(ldapDefaultPanel.createTestElement());
                                                                                                                                                      
    3
    ((LDAPSampler)sampler).addTestElement(loginPanel.createTestElement());
    2
    this.configureTestElement(con);
    2
    this.configureTestElement(con);
    4
    this.configureTestElement(sampler);
    Differences
    Expression1Expression2Difference
    consamplerVARIABLE_NAME_MISMATCH
    org.apache.jmeter.protocol.http.control.RecordingControllerorg.apache.jmeter.testelement.TestElementVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type org.apache.jmeter.protocol.http.control.RecordingController of variable con does not match with type org.apache.jmeter.testelement.TestElement of variable sampler
    • Make classes org.apache.jmeter.protocol.http.control.RecordingController and org.apache.jmeter.testelement.TestElement extend a common superclass
    4
    this.configureTestElement(sampler);
    3
    return con;
    3
    return con;
    Preondition Violations
    Unmatched return con;
                                
    Precondition Violations (2)
    Row Violation
    1Type org.apache.jmeter.protocol.http.control.RecordingController of variable con does not match with type org.apache.jmeter.testelement.TestElement of variable sampler
    2Unmatched return con;