if (o instanceof FunctionProperty) { if (function != null) { return function.equals(((JMeterProperty) o).getObjectValue()); } } return false;
if (o instanceof MapProperty) { if (value != null) { return value.equals(((JMeterProperty) o).getObjectValue()); } } return false;
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/MapProperty.java
Method name: boolean equals(Object) Method name: boolean equals(Object)
Number of AST nodes: 4 Number of AST nodes: 4
1
if (o instanceof FunctionProperty) {
1
if (o instanceof MapProperty) {
2
			if (function != null) {
2
			if (value != null) {
3
				return function.equals(((JMeterProperty) o).getObjectValue());
3
				return value.equals(((JMeterProperty) o).getObjectValue());
4
			}
4
			}
5
		}
5
		}
6
		return false;
6
		return false;
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.2
Clones locationClones are in different classes having the same super class
Number of node comparisons6
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements4
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)0.7
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    if (o instanceof FunctionProperty)
    1
    if (o instanceof FunctionProperty)
    1
    if (o instanceof MapProperty)
    Differences
    Expression1Expression2Difference
    org.apache.jmeter.testelement.property.FunctionPropertyorg.apache.jmeter.testelement.property.MapPropertySUBCLASS_TYPE_MISMATCH
    1
    if (o instanceof MapProperty)
    2
    if (function != null)
    2
    if (function != null)
    2
    if (value != null)
    Differences
    Expression1Expression2Difference
    functionvalueVARIABLE_NAME_MISMATCH
    org.apache.jmeter.engine.util.CompoundVariablejava.util.MapVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type org.apache.jmeter.engine.util.CompoundVariable of variable function does not match with type java.util.Map of variable value
    • Make classes org.apache.jmeter.engine.util.CompoundVariable and java.util.Map extend a common superclass
    2
    if (value != null)
    3
    return function.equals(((JMeterProperty)o).getObjectValue());
    3
    return function.equals(((JMeterProperty)o).getObjectValue());
    3
    return value.equals(((JMeterProperty)o).getObjectValue());
    Differences
    Expression1Expression2Difference
    functionvalueVARIABLE_NAME_MISMATCH
    org.apache.jmeter.engine.util.CompoundVariablejava.util.MapVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type org.apache.jmeter.engine.util.CompoundVariable of variable function does not match with type java.util.Map of variable value
    • Make classes org.apache.jmeter.engine.util.CompoundVariable and java.util.Map extend a common superclass
    3
    return value.equals(((JMeterProperty)o).getObjectValue());
    4
    return false;
    4
    return false;
    Precondition Violations (2)
    Row Violation
    1Type org.apache.jmeter.engine.util.CompoundVariable of variable function does not match with type java.util.Map of variable value
    2Type org.apache.jmeter.engine.util.CompoundVariable of variable function does not match with type java.util.Map of variable value