if (o instanceof CollectionProperty) { if (value != null) { return value.equals(((JMeterProperty) o).getObjectValue()); } }
if (o instanceof MapProperty) { if (value != null) { return value.equals(((JMeterProperty) o).getObjectValue()); } }
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/MapProperty.java
Method name: boolean equals(Object) Method name: boolean equals(Object)
Number of AST nodes: 3 Number of AST nodes: 3
1
if (o instanceof CollectionProperty) {
1
if (o instanceof MapProperty) {
2
			if (value != null) {
2
			if (value != null) {
3
				return value.equals(((JMeterProperty) o).getObjectValue());
3
				return value.equals(((JMeterProperty) o).getObjectValue());
4
			}
4
			}
5
		}
5
		}
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 comparisons5
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements3
    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.0
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    if (o instanceof CollectionProperty)
    1
    if (o instanceof CollectionProperty)
    1
    if (o instanceof MapProperty)
    Differences
    Expression1Expression2Difference
    org.apache.jmeter.testelement.property.CollectionPropertyorg.apache.jmeter.testelement.property.MapPropertySUBCLASS_TYPE_MISMATCH
    1
    if (o instanceof MapProperty)
    2
    if (value != null)
    2
    if (value != null)
    2
    if (value != null)
    Differences
    Expression1Expression2Difference
    java.util.Collectionjava.util.MapVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type java.util.Collection of variable value does not match with type java.util.Map of variable value
    • Make classes java.util.Collection and java.util.Map extend a common superclass
    2
    if (value != null)
    3
    return value.equals(((JMeterProperty)o).getObjectValue());
    3
    return value.equals(((JMeterProperty)o).getObjectValue());
    3
    return value.equals(((JMeterProperty)o).getObjectValue());
    Differences
    Expression1Expression2Difference
    java.util.Collectionjava.util.MapVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type java.util.Collection of variable value does not match with type java.util.Map of variable value
    • Make classes java.util.Collection and java.util.Map extend a common superclass
    3
    return value.equals(((JMeterProperty)o).getObjectValue());
    Precondition Violations (3)
    Row Violation
    1Type java.util.Collection of variable value does not match with type java.util.Map of variable value
    2Type java.util.Collection of variable value does not match with type java.util.Map of variable value
    3Not all possible execution flows end in a return statement