File path: /jakarta-jmeter-2.3.2/test/src/org/apache/jmeter/functions/TestJexlFunction.java | File path: /jakarta-jmeter-2.3.2/test/src/org/apache/jmeter/functions/TestTimeFunction.java | |||
Method name: void testSumVar()
|
Method name: void testYMDnoV()
|
|||
Number of AST nodes: 5 | Number of AST nodes: 5 | |||
1 | params.add(new CompoundVariable("1+2+3"));↵ | 1 | params.add(new CompoundVariable("YMD"));↵ | |
2 | params.add(new CompoundVariable("TOTAL"));↵ | 2 | ↵ | |
3 | function.setParameters(params);↵ | 3 | variable.setParameters(params);↵ | |
4 | String ret = function.execute(result, null);↵ | 4 | value = variable.execute(result, null);↵ | |
5 | assertEquals("6", ret↵ | 5 | assertEquals(8,value.length());↵ | |
6 | ); | 6 | assertNull(vars.get("NAME")); | |
See real code fragment | See real code fragment |
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 0 |
Number of non-refactorable cases | 1 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.0 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 25 |
Number of mapped statements | 3 |
Number of unmapped statements in the first code fragment | 2 |
Number of unmapped statements in the second code fragment | 2 |
Time elapsed for statement mapping (ms) | 0.0 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | params.add(new CompoundVariable("1+2+3")); |
| 1 | params.add(new CompoundVariable("YMD")); | |||||||||||||||||
2 | params.add(new CompoundVariable("TOTAL")); | | |||||||||||||||||||
3 | function.setParameters(params); |
| 2 | variable.setParameters(params); | |||||||||||||||||
| 3 | value = variable.execute(result, null); | |||||||||||||||||||
| 4 | assertEquals(8, value.length()); | |||||||||||||||||||
4 | String ret = function.execute(result, null); |
| | ||||||||||||||||||
5 | assertEquals("6", ret); |
| 5 | assertNull(vars.get("NAME")); |
Row | Violation |
---|---|
1 | Type org.apache.jmeter.functions.JexlFunction of variable function does not match with type org.apache.jmeter.functions.Function of variable variable |
2 | Unmatched statement String ret=function.execute(result,null); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
3 | Expression assertEquals("6",ret) is a void method call, and thus it cannot be parameterized |
4 | Expression assertNull(vars.get("NAME")) is a void method call, and thus it cannot be parameterized |
5 | Expression assertEquals("6",ret) is a void method call, and thus it cannot be parameterized |
6 | Expression assertNull(vars.get("NAME")) is a void method call, and thus it cannot be parameterized |