assertEquals("Loop: "+i,"before", nextName(controller)); if (i==1) { assertEquals("Loop: "+i,"one", nextName(controller)); assertEquals("Loop: "+i,"two", nextName(controller)); assertEquals("Loop: "+i,"three", nextName(controller)); jmvars.put("VAR", "LAST"); // Should not enter the loop next time assertEquals("Loop: "+i,"four", nextName(controller)); } assertEquals("Loop: "+i,"after", nextName(controller)); assertNull("Loop: "+i,nextName(controller));
assertEquals("Loop: "+i,"before", nextName(controller)); if (i==1){ assertEquals("Loop: "+i,"one", nextName(controller)); assertEquals("Loop: "+i,"two", nextName(controller)); jmvars.put("VAR", "LAST"); // Should not enter the loop next time // But should continue to the end of the loop assertEquals("Loop: "+i,"three", nextName(controller)); assertEquals("Loop: "+i,"four", nextName(controller)); } assertEquals("Loop: "+i,"after", nextName(controller)); assertNull("Loop: "+i,nextName(controller));
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: Method name:
Number of AST nodes: 0 Number of AST nodes: 0
1
assertEquals("Loop: "+i,"before", nextName(controller));
1
assertEquals("Loop: "+i,"before", nextName(controller));
2
				if (i==1) {
2
				if (i==1){
3
					assertEquals("Loop: "+i,"one", nextName(controller));
3
					assertEquals("Loop: "+i,"one", nextName(controller));
4
					assertEquals("Loop: "+i,"two", nextName(controller));
4
					assertEquals("Loop: "+i,"two", nextName(controller));
5
					assertEquals("Loop: "+i,"three", nextName(controller));
5
					
6
					jmvars.put("VAR", "LAST"); // Should not enter the loop next time
6
jmvars.put("VAR", "LAST"); // Should not enter the loop next time
7
					
7
					// But should continue to the end of the loop
8
					assertEquals("Loop: "+i,"three", nextName(controller));
8
assertEquals("Loop: "+i,"four", nextName(controller));
9
					assertEquals("Loop: "+i,"four", nextName(controller));
9
				}
10
				}
10
				assertEquals("Loop: "+i,"after", nextName(controller));
11
				assertEquals("Loop: "+i,"after", nextName(controller));
11
				assertNull("Loop: "+i,nextName(controller));
12
				assertNull("Loop: "+i,nextName(controller));
12
			
13
			
Summary
Number of common nesting structure subtrees0
Number of refactorable cases0
Number of non-refactorable cases0
Time elapsed for finding largest common nesting structure subtrees (ms)0.0
Clones location
Number of node comparisons0