HTTPSamplerBase base = (HTTPSamplerBase) super.clone(); base.dynamicPath = dynamicPath; base.fileList = null; return base;
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/http/sampler/HTTPSamplerBase.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
HTTPSamplerBase base = (HTTPSamplerBase) super.clone();
2
		base.dynamicPath = dynamicPath;
3
		base.fileList = null;
1
UserParameters up = (UserParameters) super.clone();
2
		up.lock = lock; // ensure that clones share the same lock object
4
		return base;
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
    HTTPSamplerBase base = (HTTPSamplerBase)super.clone();
    1
    HTTPSamplerBase base = (HTTPSamplerBase)super.clone();
    1
    UserParameters up = (UserParameters)super.clone();
    Differences
    Expression1Expression2Difference
    org.apache.jmeter.protocol.http.sampler.HTTPSamplerBaseorg.apache.jmeter.modifiers.UserParametersSUBCLASS_TYPE_MISMATCH
    baseupVARIABLE_NAME_MISMATCH
    org.apache.jmeter.protocol.http.sampler.HTTPSamplerBaseorg.apache.jmeter.modifiers.UserParametersSUBCLASS_TYPE_MISMATCH
    org.apache.jmeter.protocol.http.sampler.HTTPSamplerBaseorg.apache.jmeter.modifiers.UserParametersSUBCLASS_TYPE_MISMATCH
    Preondition Violations
    Super method call HTTPSamplerBase base=(HTTPSamplerBase)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
    base.dynamicPath = dynamicPath;
    2
    base.dynamicPath = dynamicPath;
    Preondition Violations
    Unmatched statement base.dynamicPath=dynamicPath; cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
                                                                    
    3
    base.fileList = null;
    3
    base.fileList = null;
    Preondition Violations
    Unmatched statement base.fileList=null; cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
                                                
    4
    return base;
    4
    return base;
    3
    return up;
    Differences
    Expression1Expression2Difference
    baseupVARIABLE_NAME_MISMATCH
    org.apache.jmeter.protocol.http.sampler.HTTPSamplerBaseorg.apache.jmeter.modifiers.UserParametersSUBCLASS_TYPE_MISMATCH
    3
    return up;
    Precondition Violations (5)
    Row Violation
    1Super method call HTTPSamplerBase base=(HTTPSamplerBase)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 base.dynamicPath=dynamicPath; cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    5Unmatched statement base.fileList=null; cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted