HTTPSamplerBase base = (HTTPSamplerBase) super.clone(); base.dynamicPath = dynamicPath; base.fileList = null; return base;
BeanShellTestElement o = (BeanShellTestElement) super.clone(); o.init(); return o;
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/util/BeanShellTestElement.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;
4
		
1
BeanShellTestElement o = (BeanShellTestElement) super.clone();
2
        o.init();
5
return base;
3
       return o;
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
    BeanShellTestElement o = (BeanShellTestElement)super.clone();
    Differences
    Expression1Expression2Difference
    org.apache.jmeter.protocol.http.sampler.HTTPSamplerBaseorg.apache.jmeter.util.BeanShellTestElementSUBCLASS_TYPE_MISMATCH
    baseoVARIABLE_NAME_MISMATCH
    org.apache.jmeter.protocol.http.sampler.HTTPSamplerBaseorg.apache.jmeter.util.BeanShellTestElementSUBCLASS_TYPE_MISMATCH
    org.apache.jmeter.protocol.http.sampler.HTTPSamplerBaseorg.apache.jmeter.util.BeanShellTestElementSUBCLASS_TYPE_MISMATCH
    Preondition Violations
    Super method call HTTPSamplerBase base=(HTTPSamplerBase)super.clone(); cannot be extracted from method
    Super method call BeanShellTestElement o=(BeanShellTestElement)super.clone(); cannot be extracted from method
    1
    BeanShellTestElement o = (BeanShellTestElement)super.clone();
                            
    2
    o.init();
    Preondition Violations
    Unmatched statement o.init(); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    2
    o.init();
    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 o;
    Differences
    Expression1Expression2Difference
    baseoVARIABLE_NAME_MISMATCH
    org.apache.jmeter.protocol.http.sampler.HTTPSamplerBaseorg.apache.jmeter.util.BeanShellTestElementSUBCLASS_TYPE_MISMATCH
    3
    return o;
    Precondition Violations (5)
    Row Violation
    1Super method call HTTPSamplerBase base=(HTTPSamplerBase)super.clone(); cannot be extracted from method
    2Super method call BeanShellTestElement o=(BeanShellTestElement)super.clone(); cannot be extracted from method
    3Unmatched statement o.init(); 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