if (savedValue != null) { value = savedValue; } recoverRunningVersionOfSubElements(owner);
if (savedValue != null) { value = savedValue; } value.recoverRunningVersion();
Clone fragments detected by clone detection tool
File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/testelement/property/CollectionProperty.java File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/testelement/property/TestElementProperty.java
Method name: void recoverRunningVersion(TestElement) Method name: void recoverRunningVersion(TestElement)
Number of AST nodes: 3 Number of AST nodes: 3
1
if (savedValue != null) {
1
if (savedValue != null) {
2
			value = savedValue;
2
			value = savedValue;
3
		}
3
		}
4
		recoverRunningVersionOfSubElements(owner);
4
		value.recoverRunningVersion();
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.1
Clones locationClones are in different classes having the same super class
Number of node comparisons5
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements2
    Number of unmapped statements in the first code fragment1
    Number of unmapped statements in the second code fragment1
    Time elapsed for statement mapping (ms)3654.0
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    if (savedValue != null)
    1
    if (savedValue != null)
    1
    if (savedValue != null)
    Differences
    Expression1Expression2Difference
    java.util.Collectionorg.apache.jmeter.testelement.TestElementVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type java.util.Collection of variable savedValue does not match with type org.apache.jmeter.testelement.TestElement of variable savedValue
    • Make classes java.util.Collection and org.apache.jmeter.testelement.TestElement extend a common superclass
    1
    if (savedValue != null)
                                            
    2
    value = savedValue;
    2
    value = savedValue;
                                            
    3
    recoverRunningVersionOfSubElements(owner);
    3
    recoverRunningVersionOfSubElements(owner);
    3
    value.recoverRunningVersion();
    Differences
    Expression1Expression2Difference
    recoverRunningVersionOfSubElementsrecoverRunningVersionMETHOD_INVOCATION_NAME_MISMATCH
    recoverRunningVersionOfSubElements(owner)value.recoverRunningVersion()ARGUMENT_NUMBER_MISMATCH
    valueMISSING_METHOD_INVOCATION_EXPRESSION
    Preondition Violations
    Expression recoverRunningVersionOfSubElements(owner) is a void method call, and thus it cannot be parameterized
    Expression value.recoverRunningVersion() is a void method call, and thus it cannot be parameterized
    Expression recoverRunningVersionOfSubElements(owner) is a void method call, and thus it cannot be parameterized
    Expression value.recoverRunningVersion() is a void method call, and thus it cannot be parameterized
    3
    value.recoverRunningVersion();
    Precondition Violations (5)
    Row Violation
    1Type java.util.Collection of variable savedValue does not match with type org.apache.jmeter.testelement.TestElement of variable savedValue
    2Expression recoverRunningVersionOfSubElements(owner) is a void method call, and thus it cannot be parameterized
    3Expression value.recoverRunningVersion() is a void method call, and thus it cannot be parameterized
    4Expression recoverRunningVersionOfSubElements(owner) is a void method call, and thus it cannot be parameterized
    5Expression value.recoverRunningVersion() is a void method call, and thus it cannot be parameterized