if (bshInterpreter == null) {
result.setFailure(true);
result.setError(true);
result.setFailureMessage("BeanShell Interpreter not found");
return result;
}
if (mgr == null) {
result.setFailure(true);
result.setError(true);
result.setFailureMessage("BSF Manager not found");
return result;
}
Clone fragments detected by clone detection tool
File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/assertions/BeanShellAssertion.java
|
|
File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/assertions/BSFAssertion.java
|
Method name: AssertionResult getResult(SampleResult)
|
|
Method name: AssertionResult getResult(SampleResult)
|
Number of AST nodes: 5
|
|
Number of AST nodes: 5
|
|
1 | if (bshInterpreter == null) {↵ | | 1 | if (mgr == null) {↵
|
2 | result.setFailure(true);↵ | | 2 | result.setFailure(true);↵
|
3 | result.setError(true);↵ | | 3 | result.setError(true);↵
|
4 | result.setFailureMessage("BeanShell Interpreter not found");↵ | | 4 | result.setFailureMessage("BSF Manager not found");↵
|
5 | return result;↵ | | 5 | return result; ↵
|
6 | } | | 6 | }
|
See real code fragment |
|
See real code fragment |
Summary
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.2 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 25 |
-
{Non-refactorable}
Mapping Summary
Number of mapped statements | 5 |
Number of unmapped statements in the first code fragment | 0 |
Number of unmapped statements in the second code fragment | 0 |
Time elapsed for statement mapping (ms) | 2.3 |
Clone type | Type 2 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
3 | if (bshInterpreter == null) | | 4 | if (mgr == null) |
4 | | | 5 | |
5 | | | 6 | |
6 | result.setFailureMessage("BeanShell Interpreter not found"); | | 7 | result.setFailureMessage("BSF Manager not found"); |
7 | | | 8 | |
Precondition Violations (2)
Row |
Violation |
1 | Type org.apache.jmeter.util.BeanShellInterpreter of variable bshInterpreter does not match with type org.apache.bsf.BSFManager of variable mgr |
2 | Not all possible execution flows end in a return statement |