if (o != null)
{
str = o.toString();
}
if (vars != null && varName.length() > 0) {// vars will be null on TestPlan
vars.put(varName, str);
}
if (bshOut != null) {
resultStr = bshOut.toString();
}
if (vars != null && varName.length() > 0) {// vars will be null on TestPlan
vars.put(varName, resultStr);
}
Clone fragments detected by clone detection tool
File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/functions/JexlFunction.java
|
|
File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/functions/BeanShell.java
|
Method name: String execute(SampleResult, Sampler)
|
|
Method name: String execute(SampleResult, Sampler)
|
Number of AST nodes: 4
|
|
Number of AST nodes: 4
|
|
1 | if (o != null)↵ | | 1 | if (bshOut != null)↵
|
2 | {↵ | | |
|
3 | str = o.toString();↵ | | |
|
4 | }↵ | | |
|
5 | ↵ | | 2 | {↵
|
| | | 3 | resultStr = bshOut.toString();↵
|
| | | 4 | }↵
|
6 | if (vars != null && varName.length() > 0) {// vars will be null on TestPlan↵ | | 5 | if (vars != null && varName.length() > 0) {// vars will be null on TestPlan↵
|
7 | vars.put(varName, str);↵ | | 6 | vars.put(varName, ↵
|
8 | ↵ | | 7 | resultStr);↵
|
9 | } | | 8 | }
|
See real code fragment |
|
See real code fragment |
Summary
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.8 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 11 |
-
{Refactorable}
Mapping Summary
Number of mapped statements | 4 |
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 |
20 | if (o != null) | | 21 | if (bshOut != null) |
21 | | | 22 | resultStr = bshOut.toString(); |
22 | if (vars != null && varName.length() > 0) | | 23 | if (vars != null && varName.length() > 0) |
23 | | | 24 | vars.put(varName, resultStr); |
Precondition Violations (0)
Row |
Violation |