if (savedValue != null) { value = savedValue; } value.recoverRunningVersion();
if (savedValue != null) { value = savedValue; } recoverRunningVersionOfSubElements(owner);
Clone fragments detected by clone detection tool
File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/testelement/property/TestElementProperty.java File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/testelement/property/MapProperty.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
		value.recoverRunningVersion();
4
		recoverRunningVersionOfSubElements(owner);
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)4095.7
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    if (savedValue != null)
    1
    if (savedValue != null)
    1
    if (savedValue != null)
    Differences
    Expression1Expression2Difference
    org.apache.jmeter.testelement.TestElementjava.util.MapVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type org.apache.jmeter.testelement.TestElement of variable savedValue does not match with type java.util.Map of variable savedValue
    • Make classes org.apache.jmeter.testelement.TestElement and java.util.Map extend a common superclass
    1
    if (savedValue != null)
                                            
    2
    value = savedValue;
    2
    value = savedValue;
                                            
    3
    value.recoverRunningVersion();
    3
    value.recoverRunningVersion();
    3
    recoverRunningVersionOfSubElements(owner);
    Differences
    Expression1Expression2Difference
    recoverRunningVersionrecoverRunningVersionOfSubElementsMETHOD_INVOCATION_NAME_MISMATCH
    value.recoverRunningVersion()recoverRunningVersionOfSubElements(owner)ARGUMENT_NUMBER_MISMATCH
    valueMISSING_METHOD_INVOCATION_EXPRESSION
    Preondition Violations
    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
    Expression recoverRunningVersionOfSubElements(owner) is a void method call, and thus it cannot be parameterized
    3
    recoverRunningVersionOfSubElements(owner);
    Precondition Violations (5)
    Row Violation
    1Type org.apache.jmeter.testelement.TestElement of variable savedValue does not match with type java.util.Map of variable savedValue
    2Expression value.recoverRunningVersion() is a void method call, and thus it cannot be parameterized
    3Expression recoverRunningVersionOfSubElements(owner) is a void method call, and thus it cannot be parameterized
    4Expression value.recoverRunningVersion() is a void method call, and thus it cannot be parameterized
    5Expression recoverRunningVersionOfSubElements(owner) is a void method call, and thus it cannot be parameterized