data = new TreeMap(); for (int x = 0; x < keys.length; x++) { data.put(keys[x], new SortedHashTree()); }
data = new HashMap(); for (int x = 0; x < keys.length; x++) { data.put(keys[x], new HashTree()); }
Clone fragments detected by clone detection tool
File path: /jakarta-jmeter-2.3.2/src/org/apache/jorphan/collections/SortedHashTree.java File path: /jakarta-jmeter-2.3.2/src/org/apache/jorphan/collections/HashTree.java
Method name: void SortedHashTree(Object[]) Method name: void HashTree(Object[])
Number of AST nodes: 3 Number of AST nodes: 3
1
data = new TreeMap();
1
data = new HashMap();
2
		for (int x = 0; x < keys.length; x++) {
2
		for (int x = 0; x < keys.length; x++) {
3
			data.put(keys[x], new SortedHashTree());
3
			data.put(keys[x], new HashTree());
4
		}
4
		}
Summary
Number of common nesting structure subtrees1
Number of refactorable cases1
Number of non-refactorable cases0
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 comparisons5
  1. {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.8
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    data = new TreeMap();
    1
    data = new TreeMap();
    1
    data = new HashMap();
    Differences
    Expression1Expression2Difference
    java.util.TreeMapjava.util.HashMapSUBCLASS_TYPE_MISMATCH
    1
    data = new HashMap();
    2
    for (int x = 0; x < keys.length; x++)
    2
    for (int x = 0; x < keys.length; x++)
    3
    data.put(keys[x], new SortedHashTree());
    3
    data.put(keys[x], new SortedHashTree());
    3
    data.put(keys[x], new HashTree());
    Differences
    Expression1Expression2Difference
    org.apache.jorphan.collections.SortedHashTreeorg.apache.jorphan.collections.HashTreeSUBCLASS_TYPE_MISMATCH
    3
    data.put(keys[x], new HashTree());
    Precondition Violations (0)
    Row Violation