while_cont.addTestElement(new TestSampler("three")); while_cont.addTestElement(new TestSampler("four")); controller.addTestElement(new TestSampler("after")); controller.initialize();
simple.addTestElement(new TestSampler("three")); simple.addTestElement(new TestSampler("four")); controller.addTestElement(new TestSampler("after")); controller.initialize();
Clone fragments detected by clone detection tool
File path: /jakarta-jmeter-2.3.2/test/src/org/apache/jmeter/control/TestWhileController.java File path: /jakarta-jmeter-2.3.2/test/src/org/apache/jmeter/control/TestWhileController.java
Method name: void testVariable2() Method name: void testVariable1()
Number of AST nodes: 4 Number of AST nodes: 4
1
while_cont.addTestElement(new TestSampler("three"));
1
simple.addTestElement(new TestSampler("three"));
2
			while_cont.addTestElement(new TestSampler("four"));
2
			simple.addTestElement(new TestSampler("four"));
3
			controller.addTestElement(new TestSampler("after"));
3
			controller.addTestElement(new TestSampler("after"));
4
			controller.initialize();
4
			controller.initialize();
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.0
Clones locationClones are declared in the same class
Number of node comparisons16
  1. {Refactorable}
    Mapping Summary
    Number of mapped statements4
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)0.0
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    15
    while_cont.addTestElement(new TestSampler("three"));
    15
    while_cont.addTestElement(new TestSampler("three"));
    15
    simple.addTestElement(new TestSampler("three"));
    Differences
    Expression1Expression2Difference
    while_contsimpleVARIABLE_NAME_MISMATCH
    org.apache.jmeter.control.WhileControllerorg.apache.jmeter.control.GenericControllerSUBCLASS_TYPE_MISMATCH
    15
    simple.addTestElement(new TestSampler("three"));
    16
    while_cont.addTestElement(new TestSampler("four"));
    16
    while_cont.addTestElement(new TestSampler("four"));
    16
    simple.addTestElement(new TestSampler("four"));
    Differences
    Expression1Expression2Difference
    while_contsimpleVARIABLE_NAME_MISMATCH
    org.apache.jmeter.control.WhileControllerorg.apache.jmeter.control.GenericControllerSUBCLASS_TYPE_MISMATCH
    16
    simple.addTestElement(new TestSampler("four"));
    17
    controller.addTestElement(new TestSampler("after"));
    17
    controller.addTestElement(new TestSampler("after"));
    18
    controller.initialize();
    18
    controller.initialize();
    Precondition Violations (0)
    Row Violation