if (!data.containsKey(key)) { order.add(key); } super.set(key, t);
if (!data.containsKey(key)) { order.add(key); } super.set(key, values);
Clone fragments detected by clone detection tool
File path: /jakarta-jmeter-2.3.2/src/org/apache/jorphan/collections/ListedHashTree.java File path: /jakarta-jmeter-2.3.2/src/org/apache/jorphan/collections/ListedHashTree.java
Method name: void set(Object, HashTree) Method name: void set(Object, Collection)
Number of AST nodes: 3 Number of AST nodes: 3
1
if (!data.containsKey(key)) {
1
if (!data.containsKey(key)) {
2
			order.add(key);
2
			order.add(key);
3
		}
3
		}
4
		super.set(key, t);
4
		super.set(key, values);
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 declared in the same 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)0.4
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    if (!data.containsKey(key))
    1
    if (!data.containsKey(key))
    2
    order.add(key);
    2
    order.add(key);
    3
    super.set(key, t);
    3
    super.set(key, t);
    3
    super.set(key, values);
    Differences
    Expression1Expression2Difference
    tvaluesVARIABLE_NAME_MISMATCH
    org.apache.jorphan.collections.HashTreejava.util.CollectionVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type org.apache.jorphan.collections.HashTree of variable t does not match with type java.util.Collection of variable values
    • Make classes org.apache.jorphan.collections.HashTree and java.util.Collection extend a common superclass
    3
    super.set(key, values);
    Precondition Violations (1)
    Row Violation
    1Type org.apache.jorphan.collections.HashTree of variable t does not match with type java.util.Collection of variable values