BSFTestElement o = (BSFTestElement) super.clone(); o.init(); return o;
DurationAssertion el = new DurationAssertion(); modifyTestElement(el); return el;
Clone fragments detected by clone detection tool
File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/util/BSFTestElement.java File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/assertions/gui/DurationAssertionGui.java
Method name: Object clone() Method name: TestElement createTestElement()
Number of AST nodes: 3 Number of AST nodes: 3
1
BSFTestElement o = (BSFTestElement) super.clone();
1
DurationAssertion el = new DurationAssertion();
2
        o.init();
3
       
2
		modifyTestElement(el);
4
return o;
3
		return el;
Summary
Number of common nesting structure subtrees1
Number of refactorable cases0
Number of non-refactorable cases1
Time elapsed for finding largest common nesting structure subtrees (ms)0.0
Clones locationClones are in different classes
Number of node comparisons6
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements3
    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.0
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    BSFTestElement o = (BSFTestElement)super.clone();
    1
    BSFTestElement o = (BSFTestElement)super.clone();
    1
    DurationAssertion el = new DurationAssertion();
    Differences
    Expression1Expression2Difference
    org.apache.jmeter.util.BSFTestElementorg.apache.jmeter.assertions.DurationAssertionSUBCLASS_TYPE_MISMATCH
    oelVARIABLE_NAME_MISMATCH
    org.apache.jmeter.util.BSFTestElementorg.apache.jmeter.assertions.DurationAssertionSUBCLASS_TYPE_MISMATCH
    (BSFTestElement)super.clone()new DurationAssertion()TYPE_COMPATIBLE_REPLACEMENT
    1
    DurationAssertion el = new DurationAssertion();
    2
    o.init();
    2
    o.init();
    2
    modifyTestElement(el);
    Differences
    Expression1Expression2Difference
    initmodifyTestElementMETHOD_INVOCATION_NAME_MISMATCH
    o.init()modifyTestElement(el)ARGUMENT_NUMBER_MISMATCH
    oMISSING_METHOD_INVOCATION_EXPRESSION
    Preondition Violations
    Expression o.init() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    • Inline private method init
    Expression modifyTestElement(el) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression o.init() is a void method call, and thus it cannot be parameterized
    Expression modifyTestElement(el) is a void method call, and thus it cannot be parameterized
    Expression o.init() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    • Inline private method init
    Expression modifyTestElement(el) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression o.init() is a void method call, and thus it cannot be parameterized
    Expression modifyTestElement(el) is a void method call, and thus it cannot be parameterized
    2
    modifyTestElement(el);
    3
    return o;
    3
    return o;
    3
    return el;
    Differences
    Expression1Expression2Difference
    oelVARIABLE_NAME_MISMATCH
    org.apache.jmeter.util.BSFTestElementorg.apache.jmeter.assertions.DurationAssertionSUBCLASS_TYPE_MISMATCH
    3
    return el;
    Precondition Violations (8)
    Row Violation
    1Expression o.init() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    2Expression modifyTestElement(el) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    3Expression o.init() is a void method call, and thus it cannot be parameterized
    4Expression modifyTestElement(el) is a void method call, and thus it cannot be parameterized
    5Expression o.init() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    6Expression modifyTestElement(el) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    7Expression o.init() is a void method call, and thus it cannot be parameterized
    8Expression modifyTestElement(el) is a void method call, and thus it cannot be parameterized