HTTPSamplerBase base = (HTTPSamplerBase) super.clone(); base.dynamicPath = dynamicPath; base.fileList = null; return base;
while (i.hasNext()) { JavaSampler sampler = (JavaSampler) i.next(); sampler.releaseJavaClient(); i.remove(); }
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/protocol/java/sampler/JavaSampler.java
Method name: Object clone() Method name: void testEnded()
Number of AST nodes: 4 Number of AST nodes: 4
1
HTTPSamplerBase base = (HTTPSamplerBase) super.clone();
2
		base.dynamicPath = dynamicPath;
3
		base.fileList = null;
4
		return base;
1
while (i.hasNext()) {
2
				JavaSampler sampler = (JavaSampler) i.next();
3
				sampler.releaseJavaClient();
4
				i.remove();
5
			}
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 having the same super class
Number of node comparisons10
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements1
    Number of unmapped statements in the first code fragment3
    Number of unmapped statements in the second code fragment2
    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();
    5
    JavaSampler sampler = (JavaSampler)i.next();
    Differences
    Expression1Expression2Difference
    org.apache.jmeter.protocol.http.sampler.HTTPSamplerBaseorg.apache.jmeter.protocol.java.sampler.JavaSamplerSUBCLASS_TYPE_MISMATCH
    basesamplerVARIABLE_NAME_MISMATCH
    org.apache.jmeter.protocol.http.sampler.HTTPSamplerBaseorg.apache.jmeter.protocol.java.sampler.JavaSamplerSUBCLASS_TYPE_MISMATCH
    org.apache.jmeter.protocol.http.sampler.HTTPSamplerBaseorg.apache.jmeter.protocol.java.sampler.JavaSamplerSUBCLASS_TYPE_MISMATCH
    super.clone()i.next()TYPE_COMPATIBLE_REPLACEMENT
    Preondition Violations
    Expression (JavaSampler)i.next() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression i.next() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Super method call HTTPSamplerBase base=(HTTPSamplerBase)super.clone(); cannot be extracted from method
    5
    JavaSampler sampler = (JavaSampler)i.next();
    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;
    Preondition Violations
    Unmatched statement return base; cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    Unmatched return base;
                                  
                                                                  
    6
    sampler.releaseJavaClient();
    Preondition Violations
    Unmatched statement sampler.releaseJavaClient(); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    6
    sampler.releaseJavaClient();
                                
    7
    i.remove();
    Precondition Violations (9)
    Row Violation
    1Expression (JavaSampler)i.next() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    2Expression i.next() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    3Super method call HTTPSamplerBase base=(HTTPSamplerBase)super.clone(); cannot be extracted from method
    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
    6Unmatched statement return base; cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    7Unmatched return base;
    8Unmatched statement sampler.releaseJavaClient(); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    9Clone fragment #1 returns variable base with type org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase , while Clone fragment #2 returns variable sampler with type org.apache.jmeter.protocol.java.sampler.JavaSampler