DataSourceElement el = (DataSourceElement) super.clone(); el.excaliburSource = excaliburSource; el.perThreadPoolSet = perThreadPoolSet; return el;
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/protocol/jdbc/config/DataSourceElement.java File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/modifiers/UserParameters.java
Method name: Object clone() Method name: Object clone()
Number of AST nodes: 4 Number of AST nodes: 3
1
DataSourceElement el = (DataSourceElement) super.clone();
2
		el.excaliburSource = excaliburSource;
3
		el.perThreadPoolSet = perThreadPoolSet;
1
UserParameters up = (UserParameters) super.clone();
2
		up.lock = lock; // ensure that clones share the same lock object
4
		return el;
3
		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 having the same super class
Number of node comparisons10
  1. {Refactorable}
    Mapping Summary
    Number of mapped statements2
    Number of unmapped statements in the first code fragment2
    Number of unmapped statements in the second code fragment1
    Time elapsed for statement mapping (ms)0.0
    Clone typeType 3
    Mapped Statements
    ID Statement ID Statement
    1
    DataSourceElement el = (DataSourceElement)super.clone();
    1
    DataSourceElement el = (DataSourceElement)super.clone();
    1
    UserParameters up = (UserParameters)super.clone();
    Differences
    Expression1Expression2Difference
    org.apache.jmeter.protocol.jdbc.config.DataSourceElementorg.apache.jmeter.modifiers.UserParametersSUBCLASS_TYPE_MISMATCH
    elupVARIABLE_NAME_MISMATCH
    org.apache.jmeter.protocol.jdbc.config.DataSourceElementorg.apache.jmeter.modifiers.UserParametersSUBCLASS_TYPE_MISMATCH
    org.apache.jmeter.protocol.jdbc.config.DataSourceElementorg.apache.jmeter.modifiers.UserParametersSUBCLASS_TYPE_MISMATCH
    Preondition Violations
    Super method call DataSourceElement el=(DataSourceElement)super.clone(); cannot be extracted from method
    Super method call UserParameters up=(UserParameters)super.clone(); cannot be extracted from method
    1
    UserParameters up = (UserParameters)super.clone();
                                    
    2
    up.lock = lock;
    Preondition Violations
    Unmatched statement up.lock=lock; cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    2
    up.lock = lock;
    2
    el.excaliburSource = excaliburSource;
    2
    el.excaliburSource = excaliburSource;
    Preondition Violations
    Unmatched statement el.excaliburSource=excaliburSource; cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
                                                                                
    3
    el.perThreadPoolSet = perThreadPoolSet;
    3
    el.perThreadPoolSet = perThreadPoolSet;
    Preondition Violations
    Unmatched statement el.perThreadPoolSet=perThreadPoolSet; cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
                                                                                    
    4
    return el;
    4
    return el;
    3
    return up;
    Differences
    Expression1Expression2Difference
    elupVARIABLE_NAME_MISMATCH
    org.apache.jmeter.protocol.jdbc.config.DataSourceElementorg.apache.jmeter.modifiers.UserParametersSUBCLASS_TYPE_MISMATCH
    3
    return up;
    Precondition Violations (5)
    Row Violation
    1Super method call DataSourceElement el=(DataSourceElement)super.clone(); cannot be extracted from method
    2Super method call UserParameters up=(UserParameters)super.clone(); cannot be extracted from method
    3Unmatched statement up.lock=lock; cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    4Unmatched statement el.excaliburSource=excaliburSource; cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    5Unmatched statement el.perThreadPoolSet=perThreadPoolSet; cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted