String[] order = new String[] { "one", "three", "two", "three", "four", "five", "six", "seven", "four", "five", "six", "seven", "four", "five", "six", "seven", "three", "one", "three", "two", "three" }; int counter = 0; controller.setRunningVersion(true); sub_1.setRunningVersion(true); sub_2.setRunningVersion(true); sub_3.setRunningVersion(true); controller.initialize(); while (counter < order.length) { TestElement sampler = null; while ((sampler = controller.next()) != null) { assertEquals("failed on" + counter, order[counter], sampler.getName()); counter++; } }
String[] order = new String[] { "one", "three", "two", "four" }; int counter = 0; controller.setRunningVersion(true); sub_1.setRunningVersion(true); sub_2.setRunningVersion(true); sub_3.setRunningVersion(true); controller.initialize(); while (counter < order.length) { TestElement sampler = null; while ((sampler = controller.next()) != null) { assertEquals("failed on" + counter, order[counter], sampler.getName()); counter++; } }
Clone fragments detected by clone detection tool
File path: /jakarta-jmeter-2.3.2/test/src/org/apache/jmeter/control/TestInterleaveControl.java File path: /jakarta-jmeter-2.3.2/test/src/org/apache/jmeter/control/TestInterleaveControl.java
Method name: void testProcessing3() Method name: void testProcessing4()
Number of AST nodes: 12 Number of AST nodes: 12
1
String[] order = new String[] { "one", "three", "two", "three", "four", "five", "six", "seven", "four",
1
String[] order = new String[] { "one", "three", "two", "
2
					"five", "six", "seven", "four", "five", "six", "seven", "three", "one", "three", "two", "three" };
2
four" };
3
			int counter = 0;
3
			int counter = 0;
4
			controller.setRunningVersion(true);
4
			controller.setRunningVersion(true);
5
			sub_1.setRunningVersion(true);
5
			sub_1.setRunningVersion(true);
6
			sub_2.setRunningVersion(true);
6
			sub_2.setRunningVersion(true);
7
			sub_3.setRunningVersion(true);
7
			sub_3.setRunningVersion(true);
8
			controller.initialize();
8
			controller.initialize();
9
			while (counter < order.length) {
9
			while (counter < order.length) {
10
				TestElement sampler = null;
10
				TestElement sampler = null;
11
				while ((sampler = controller.next()) != null) {
11
				while ((sampler = controller.next()) != null) {
12
					assertEquals("failed on" + counter, order[counter], sampler.getName());
12
					assertEquals("failed on" + counter, order[counter], sampler.getName());
13
					counter++;
13
					counter++;
14
				}
14
				}
15
			}
15
			}
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.3
Clones locationClones are declared in the same class
Number of node comparisons64
  1. {Refactorable}
    Mapping Summary
    Number of mapped statements12
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)23.5
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    18
    String[] order = new String[] {"one", "three", "two", "three", "four", "five", "six", "seven", "four", "five", "six", "seven", "four", "five", "six", "seven", "three", "one", "three", "two", "three"};
    18
    String[] order = new String[] {"one", "three", "two", "three", "four", "five", "six", "seven", "four", "five", "six", "seven", "four", "five", "six", "seven", "three", "one", "three", "two", "three"};
    14
    String[] order = new String[] {"one", "three", "two", "four"};
    Differences
    Expression1Expression2Difference
    {"one","three","two","three","four","five","six","seven","four","five","six","seven","four","five","six","seven","three","one","three","two","three"}{"one","three","two","four"}ARRAY_INITIALIZER_EXPRESSION_NUMBER_MISMATCH
    {"one","three","two","three","four","five","six","seven","four","five","six","seven","four","five","six","seven","three","one","three","two","three"}{"one","three","two","four"}ARRAY_INITIALIZER_MISMATCH
    14
    String[] order = new String[] {"one", "three", "two", "four"};
    19
    int counter = 0;
    15
    int counter = 0;
    20
    controller.setRunningVersion(true);
    16
    controller.setRunningVersion(true);
    21
    sub_1.setRunningVersion(true);
    17
    sub_1.setRunningVersion(true);
    22
    sub_2.setRunningVersion(true);
    22
    sub_2.setRunningVersion(true);
    18
    sub_2.setRunningVersion(true);
    Differences
    Expression1Expression2Difference
    org.apache.jmeter.control.LoopControllerorg.apache.jmeter.control.GenericControllerSUBCLASS_TYPE_MISMATCH
    18
    sub_2.setRunningVersion(true);
    23
    sub_3.setRunningVersion(true);
    19
    sub_3.setRunningVersion(true);
    24
    controller.initialize();
    20
    controller.initialize();
    25
    while (counter < order.length)
    21
    while (counter < order.length)
    26
    TestElement sampler = null;
    22
    TestElement sampler = null;
    27
    while ((sampler = controller.next()) != null)
    23
    while ((sampler = controller.next()) != null)
    28
    assertEquals("failed on" + counter, order[counter], sampler.getName());
    24
    assertEquals("failed on" + counter, order[counter], sampler.getName());
    29
    counter++;
    25
    counter++;
    Precondition Violations (0)
    Row Violation