Script jExpr = null; if (script instanceof File) { jExpr = ScriptFactory.createScript((File) script); } else if (script instanceof URL) { jExpr = ScriptFactory.createScript((URL) script); } else { jExpr = ScriptFactory.createScript((String) script); }
Script jExpr = null; if (expr instanceof File) { jExpr = ScriptFactory.createScript((File) expr); } else if (expr instanceof URL) { jExpr = ScriptFactory.createScript((URL) expr); } else { jExpr = ScriptFactory.createScript((String) expr); }
Clone fragments detected by clone detection tool
File path: /jakarta-jmeter-2.3.2/src/org/apache/commons/jexl/bsf/JexlEngine.java File path: /jakarta-jmeter-2.3.2/src/org/apache/commons/jexl/bsf/JexlEngine.java
Method name: void exec(String, int, int, Object) Method name: Object eval(String, int, int, Object)
Number of AST nodes: 6 Number of AST nodes: 6
1
Script jExpr = null;
1
Script jExpr = null;
2
            if (script instanceof File) {
2
            if (expr instanceof File) {
3
                jExpr = ScriptFactory.createScript((File) script);
3
                jExpr = ScriptFactory.createScript((File) expr);
4
            } else if (script instanceof URL) {
4
            } else if (expr instanceof URL) {
5
                jExpr = ScriptFactory.createScript((URL) script);
5
                jExpr = ScriptFactory.createScript((URL) expr);
6
            } else {
6
            } else {
7
                jExpr = ScriptFactory.createScript((String) script);
7
                jExpr = ScriptFactory.createScript((String) expr);
8
            }
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.4
Clones locationClones are declared in the same class
Number of node comparisons22
  1. {Refactorable}
    Mapping Summary
    Number of mapped statements6
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)1.8
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    4
    Script jExpr = null;
    4
    Script jExpr = null;
    5
    if (script instanceof File)
    5
    if (script instanceof File)
    5
    if (expr instanceof File)
    Differences
    Expression1Expression2Difference
    scriptexprVARIABLE_NAME_MISMATCH
    5
    if (expr instanceof File)
    6
    jExpr = ScriptFactory.createScript((File)script);
    6
    jExpr = ScriptFactory.createScript((File)script);
    6
    jExpr = ScriptFactory.createScript((File)expr);
    Differences
    Expression1Expression2Difference
    scriptexprVARIABLE_NAME_MISMATCH
    6
    jExpr = ScriptFactory.createScript((File)expr);
    7
    else if (script instanceof URL)
    7
    else if (script instanceof URL)
    7
    else if (expr instanceof URL)
    Differences
    Expression1Expression2Difference
    scriptexprVARIABLE_NAME_MISMATCH
    7
    else if (expr instanceof URL)
    8
    jExpr = ScriptFactory.createScript((URL)script);
    8
    jExpr = ScriptFactory.createScript((URL)script);
    8
    jExpr = ScriptFactory.createScript((URL)expr);
    Differences
    Expression1Expression2Difference
    scriptexprVARIABLE_NAME_MISMATCH
    8
    jExpr = ScriptFactory.createScript((URL)expr);
    else
    else
    9
    jExpr = ScriptFactory.createScript((String)script);
    9
    jExpr = ScriptFactory.createScript((String)script);
    9
    jExpr = ScriptFactory.createScript((String)expr);
    Differences
    Expression1Expression2Difference
    scriptexprVARIABLE_NAME_MISMATCH
    9
    jExpr = ScriptFactory.createScript((String)expr);
    Precondition Violations (0)
    Row Violation