if (o instanceof MapProperty) { if (value != null) { return value.equals(((JMeterProperty) o).getObjectValue()); } } return false;
if (o instanceof FunctionProperty) { if (function != null) { return function.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/MapProperty.java File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/testelement/property/FunctionProperty.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 MapProperty) {
1
if (o instanceof FunctionProperty) {
2
			if (value != null) {
2
			if (function != null) {
3
				return value.equals(((JMeterProperty) o).getObjectValue());
3
				return function.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.3
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)1.1
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    if (o instanceof MapProperty)
    1
    if (o instanceof MapProperty)
    1
    if (o instanceof FunctionProperty)
    Differences
    Expression1Expression2Difference
    org.apache.jmeter.testelement.property.MapPropertyorg.apache.jmeter.testelement.property.FunctionPropertySUBCLASS_TYPE_MISMATCH
    1
    if (o instanceof FunctionProperty)
    2
    if (value != null)
    2
    if (value != null)
    2
    if (function != null)
    Differences
    Expression1Expression2Difference
    valuefunctionVARIABLE_NAME_MISMATCH
    java.util.Maporg.apache.jmeter.engine.util.CompoundVariableVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type java.util.Map of variable value does not match with type org.apache.jmeter.engine.util.CompoundVariable of variable function
    • Make classes java.util.Map and org.apache.jmeter.engine.util.CompoundVariable extend a common superclass
    2
    if (function != null)
    3
    return value.equals(((JMeterProperty)o).getObjectValue());
    3
    return value.equals(((JMeterProperty)o).getObjectValue());
    3
    return function.equals(((JMeterProperty)o).getObjectValue());
    Differences
    Expression1Expression2Difference
    valuefunctionVARIABLE_NAME_MISMATCH
    java.util.Maporg.apache.jmeter.engine.util.CompoundVariableVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type java.util.Map of variable value does not match with type org.apache.jmeter.engine.util.CompoundVariable of variable function
    • Make classes java.util.Map and org.apache.jmeter.engine.util.CompoundVariable extend a common superclass
    3
    return function.equals(((JMeterProperty)o).getObjectValue());
    4
    return false;
    4
    return false;
    Precondition Violations (2)
    Row Violation
    1Type java.util.Map of variable value does not match with type org.apache.jmeter.engine.util.CompoundVariable of variable function
    2Type java.util.Map of variable value does not match with type org.apache.jmeter.engine.util.CompoundVariable of variable function