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
			}
Summary
Number of common nesting structure subtrees1
Number of refactorable cases1
Number of non-refactorable cases0
Time elapsed for finding largest common nesting structure subtrees (ms)0.6
Clones locationClones are in different classes having the same super class
Number of node comparisons14
  1. {Refactorable}
    Mapping Summary
    Number of mapped statements4
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)0.8
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    20
    if (o != null)
    20
    if (o != null)
    21
    if (bshOut != null)
    Differences
    Expression1Expression2Difference
    obshOutVARIABLE_NAME_MISMATCH
    21
    if (bshOut != null)
    21
    str = o.toString();
    21
    str = o.toString();
    22
    resultStr = bshOut.toString();
    Differences
    Expression1Expression2Difference
    strresultStrVARIABLE_NAME_MISMATCH
    obshOutVARIABLE_NAME_MISMATCH
    22
    resultStr = bshOut.toString();
    22
    if (vars != null && varName.length() > 0)
    23
    if (vars != null && varName.length() > 0)
    23
    vars.put(varName, str);
    23
    vars.put(varName, str);
    24
    vars.put(varName, resultStr);
    Differences
    Expression1Expression2Difference
    strresultStrVARIABLE_NAME_MISMATCH
    24
    vars.put(varName, resultStr);
    Precondition Violations (0)
    Row Violation