UserParameters params = new UserParameters(); modifyTestElement(params); return params;
UserParameters up = (UserParameters) super.clone(); up.lock = lock; // ensure that clones share the same lock object return up;
Clone fragments detected by clone detection tool
File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/modifiers/gui/UserParametersGui.java File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/modifiers/UserParameters.java
Method name: TestElement createTestElement() Method name: Object clone()
Number of AST nodes: 3 Number of AST nodes: 3
1
UserParameters params = new UserParameters();
1
UserParameters up = (UserParameters
2
		modifyTestElement(params);
2
) super.clone();
3
		up.lock = lock; // ensure that clones share the same lock object
3
		return params;
4
		return up;
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.0
Clones locationClones are in different classes
Number of node comparisons6
  1. {Refactorable}
    Mapping Summary
    Number of mapped statements2
    Number of unmapped statements in the first code fragment1
    Number of unmapped statements in the second code fragment1
    Time elapsed for statement mapping (ms)0.0
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    UserParameters params = new UserParameters();
    1
    UserParameters params = new UserParameters();
    1
    UserParameters up = (UserParameters)super.clone();
    Differences
    Expression1Expression2Difference
    paramsupVARIABLE_NAME_MISMATCH
    new UserParameters()(UserParameters)super.clone()TYPE_COMPATIBLE_REPLACEMENT
    1
    UserParameters up = (UserParameters)super.clone();
                                    
    2
    up.lock = lock;
    2
    modifyTestElement(params);
                                                              
    3
    return params;
    3
    return params;
    3
    return up;
    Differences
    Expression1Expression2Difference
    paramsupVARIABLE_NAME_MISMATCH
    3
    return up;
    Precondition Violations (0)
    Row Violation