File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/assertions/DurationAssertion.java | File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/assertions/SizeAssertion.java | |||
Method name: AssertionResult getResult(SampleResult)
|
Method name: AssertionResult getResult(SampleResult)
|
|||
Number of AST nodes: 5 | Number of AST nodes: 4 | |||
1 | if ( responseTime > duration) {↵ | |||
2 | result.setFailure(true);↵ | 1 | result.setFailure(true);↵ | |
3 | Object[] arguments = { new Long(responseTime), new Long(duration) };↵ | 2 | Object[] arguments = { new Long(resultSize), comparatorErrorMessage, new Long(getAllowedSize()) };↵ | |
4 | String message = MessageFormat.format(↵ | 3 | String message = MessageFormat.format(↵ | |
5 | JMeterUtils.getResString("duration_assertion_failure") // $NON-NLS-1$↵ | 4 | JMeterUtils.getResString("size_assertion_failure"), arguments); //$NON-NLS-1$↵ | |
6 | , arguments);↵ | 5 | ↵ | |
7 | result.setFailureMessage(message);↵ | 6 |
| |
8 | } | |||
See real code fragment | See real code fragment |
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 1 |
Number of non-refactorable cases | 0 |
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 | 16 |
Number of mapped statements | 3 |
Number of unmapped statements in the first code fragment | 1 |
Number of unmapped statements in the second code fragment | 1 |
Time elapsed for statement mapping (ms) | 0.0 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
7 | result.setFailure(true); | 5 | result.setFailure(true); | |||||||||||
| 6 | Object[] arguments = {new Long(resultSize), comparatorErrorMessage, new Long(getAllowedSize())}; | ||||||||||||
8 | Object[] arguments = {new Long(responseTime), new Long(duration)}; | | ||||||||||||
9 | String message = MessageFormat.format(JMeterUtils.getResString("duration_assertion_failure"), arguments); |
| 7 | String message = MessageFormat.format(JMeterUtils.getResString("size_assertion_failure"), arguments); | ||||||||||
10 | result.setFailureMessage(message); | 8 | result.setFailureMessage(message); |
Row | Violation |
---|