File path: /jakarta-jmeter-2.3.2/test/src/org/apache/jmeter/assertions/PackageTest.java | File path: /jakarta-jmeter-2.3.2/test/src/org/apache/jmeter/assertions/PackageTest.java | |||
Method name: void testSizeAssertionGreaterThan()
|
Method name: void testSizeAssertionLessThan()
|
|||
Number of AST nodes: 11 | Number of AST nodes: 11 | |||
1 | assertion.setCompOper(SizeAssertion.GREATERTHAN);↵ | 1 | assertion.setCompOper(SizeAssertion.LESSTHAN);↵ | |
2 | assertion.setAllowedSize(0);↵ | 2 | assertion.setAllowedSize(0);↵ | |
3 | result = assertion.getResult(sample1);↵ | 3 | result = assertion.getResult(sample1);↵ | |
4 | assertPassed();↵ | 4 | assertFailed();↵ | |
5 | result = assertion.getResult(sample0);↵ | 5 | result = assertion.getResult(sample0);↵ | |
6 | assertFailed();↵ | 6 | assertFailed();↵ | |
7 | assertion.setAllowedSize(data1Len);↵ | 7 | assertion.setAllowedSize(data1Len+1);↵ | |
8 | result = assertion.getResult(sample1);↵ | 8 | result = assertion.getResult(sample1);↵ | |
9 | assertFailed();↵ | 9 | assertPassed();↵ | |
10 | result = assertion.getResult(sample0);↵ | 10 | result = assertion.getResult(sample0);↵ | |
11 | assertFailed(); | 11 | assertPassed(); | |
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 declared in the same class |
Number of node comparisons | 52 |
Number of mapped statements | 11 |
Number of unmapped statements in the first code fragment | 1 |
Number of unmapped statements in the second code fragment | 0 |
Time elapsed for statement mapping (ms) | 0.0 |
Clone type | Type 3 |
ID | Statement | ID | Statement | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | assertion.setCompOper(SizeAssertion.GREATERTHAN); |
| 1 | assertion.setCompOper(SizeAssertion.LESSTHAN); | ||||||||||||||
2 | assertion.setAllowedSize(0); | 2 | assertion.setAllowedSize(0); | |||||||||||||||
3 | result = assertion.getResult(sample1); | 3 | result = assertion.getResult(sample1); | |||||||||||||||
4 | assertPassed(); | 9 | assertPassed(); | |||||||||||||||
5 | result = assertion.getResult(sample0); | 5 | result = assertion.getResult(sample0); | |||||||||||||||
6 | assertFailed(); | 4 | assertFailed(); | |||||||||||||||
7 | assertion.setAllowedSize(data1Len); |
| 7 | assertion.setAllowedSize(data1Len + 1); | ||||||||||||||
8 | result = assertion.getResult(sample1); | 8 | result = assertion.getResult(sample1); | |||||||||||||||
9 | assertFailed(); |
| | |||||||||||||||
10 | result = assertion.getResult(sample0); | 10 | result = assertion.getResult(sample0); | |||||||||||||||
11 | assertFailed(); |
| 11 | assertPassed(); |
Row | Violation |
---|---|
1 | Unmatched statement assertFailed(); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
2 | Expression assertFailed() cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Expression assertPassed() cannot be parameterized, because it has dependencies to/from statements that will be extracted |
4 | Expression assertFailed() is a void method call, and thus it cannot be parameterized |
5 | Expression assertPassed() is a void method call, and thus it cannot be parameterized |