FunctionProperty prop = (FunctionProperty) super.clone(); prop.cacheValue = cacheValue; prop.testIteration = testIteration; prop.function = function; return prop;
StringProperty prop = (StringProperty) super.clone(); prop.value = value; return prop;
Clone fragments detected by clone detection tool
File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/testelement/property/FunctionProperty.java File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/testelement/property/StringProperty.java
Method name: Object clone() Method name: Object clone()
Number of AST nodes: 5 Number of AST nodes: 3
1
FunctionProperty prop = (FunctionProperty) super.clone();
1
StringProperty prop = (StringProperty) super.clone();
2
		prop.cacheValue = cacheValue;
2
		prop.value = 
3
		prop.testIteration = testIteration;
4
		prop.function = function;
3
value;
5
		return prop;
4
		return prop;
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 comparisons11
  1. {Refactorable}
    Mapping Summary
    Number of mapped statements3
    Number of unmapped statements in the first code fragment2
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)0.0
    Clone typeType 3
    Mapped Statements
    ID Statement ID Statement
    1
    FunctionProperty prop = (FunctionProperty)super.clone();
    1
    FunctionProperty prop = (FunctionProperty)super.clone();
    1
    StringProperty prop = (StringProperty)super.clone();
    Differences
    Expression1Expression2Difference
    org.apache.jmeter.testelement.property.FunctionPropertyorg.apache.jmeter.testelement.property.StringPropertySUBCLASS_TYPE_MISMATCH
    org.apache.jmeter.testelement.property.FunctionPropertyorg.apache.jmeter.testelement.property.StringPropertySUBCLASS_TYPE_MISMATCH
    org.apache.jmeter.testelement.property.FunctionPropertyorg.apache.jmeter.testelement.property.StringPropertySUBCLASS_TYPE_MISMATCH
    Preondition Violations
    Super method call FunctionProperty prop=(FunctionProperty)super.clone(); cannot be extracted from method
    Super method call StringProperty prop=(StringProperty)super.clone(); cannot be extracted from method
    1
    StringProperty prop = (StringProperty)super.clone();
    2
    prop.cacheValue = cacheValue;
    2
    prop.cacheValue = cacheValue;
    2
    prop.value = value;
    Differences
    Expression1Expression2Difference
    org.apache.jmeter.testelement.property.FunctionPropertyorg.apache.jmeter.testelement.property.StringPropertySUBCLASS_TYPE_MISMATCH
    cacheValuevalueVARIABLE_NAME_MISMATCH
    cacheValuevalueVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression prop.cacheValue cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression prop.value cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression prop.cacheValue is a field being modified, and thus it cannot be parameterized
    Expression prop.value is a field being modified, and thus it cannot be parameterized
    2
    prop.value = value;
    3
    prop.testIteration = testIteration;
    3
    prop.testIteration = testIteration;
    Preondition Violations
    Unmatched statement prop.testIteration=testIteration; cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
                                                                            
    4
    prop.function = function;
    4
    prop.function = function;
    Preondition Violations
    Unmatched statement prop.function=function; cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
                                                        
    5
    return prop;
    5
    return prop;
    3
    return prop;
    Differences
    Expression1Expression2Difference
    org.apache.jmeter.testelement.property.FunctionPropertyorg.apache.jmeter.testelement.property.StringPropertySUBCLASS_TYPE_MISMATCH
    3
    return prop;
    Precondition Violations (8)
    Row Violation
    1Super method call FunctionProperty prop=(FunctionProperty)super.clone(); cannot be extracted from method
    2Super method call StringProperty prop=(StringProperty)super.clone(); cannot be extracted from method
    3Expression prop.cacheValue cannot be parameterized, because it has dependencies to/from statements that will be extracted
    4Expression prop.value cannot be parameterized, because it has dependencies to/from statements that will be extracted
    5Expression prop.cacheValue is a field being modified, and thus it cannot be parameterized
    6Expression prop.value is a field being modified, and thus it cannot be parameterized
    7Unmatched statement prop.testIteration=testIteration; cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    8Unmatched statement prop.function=function; cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted