while (i.hasNext()) { JavaSampler sampler = (JavaSampler) i.next(); sampler.releaseJavaClient(); i.remove(); }
RecordingController con = new RecordingController(); this.configureTestElement(con); return con;
Clone fragments detected by clone detection tool
File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/protocol/java/sampler/JavaSampler.java File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/protocol/http/control/gui/RecordController.java
Method name: void testEnded() Method name: TestElement createTestElement()
Number of AST nodes: 4 Number of AST nodes: 3
1
while (i.hasNext()) {
2
				JavaSampler sampler = (JavaSampler) i.next();
3
				sampler.releaseJavaCli
1
RecordingController con = new RecordingController();
4
ent();
2
		this.configureTestElement(con);
5
				i.remove();
3
		
6
			}
4
return con;
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
Number of node comparisons7
  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 fragment2
    Time elapsed for statement mapping (ms)0.0
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    5
    JavaSampler sampler = (JavaSampler)i.next();
    5
    JavaSampler sampler = (JavaSampler)i.next();
    1
    RecordingController con = new RecordingController();
    Differences
    Expression1Expression2Difference
    org.apache.jmeter.protocol.java.sampler.JavaSamplerorg.apache.jmeter.protocol.http.control.RecordingControllerSUBCLASS_TYPE_MISMATCH
    samplerconVARIABLE_NAME_MISMATCH
    org.apache.jmeter.protocol.java.sampler.JavaSamplerorg.apache.jmeter.protocol.http.control.RecordingControllerSUBCLASS_TYPE_MISMATCH
    (JavaSampler)i.next()new RecordingController()TYPE_COMPATIBLE_REPLACEMENT
    1
    RecordingController con = new RecordingController();
                                                                        
    2
    this.configureTestElement(con);
                                
    3
    return con;
    6
    sampler.releaseJavaClient();
    6
    sampler.releaseJavaClient();
    Preondition Violations
    Unmatched statement sampler.releaseJavaClient(); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
                                                                  
    7
    i.remove();
    7
    i.remove();
    Preondition Violations
    Unmatched statement i.remove(); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
                                
    Precondition Violations (3)
    Row Violation
    1Unmatched statement sampler.releaseJavaClient(); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    2Unmatched statement i.remove(); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    3Clone fragment #1 returns variable sampler with type org.apache.jmeter.protocol.java.sampler.JavaSampler , while Clone fragment #2 returns variable con with type org.apache.jmeter.protocol.http.control.RecordingController