public ListedHashTree(Collection<?> keys) {
this();
for (Object temp : keys) {
data.put(temp, new ListedHashTree());
order.add(temp);
}
}
public ListedHashTree(Object[] keys) {
this();
for (int x = 0; x < keys.length; x++) {
Object temp = keys[x];
data.put(temp, new ListedHashTree());
order.add(tem
Clone fragments detected by clone detection tool
File path: /apache-jmeter-2.11/src/jorphan/org/apache/jorphan/collections/ListedHashTree.java
|
|
File path: /apache-jmeter-2.11/src/jorphan/org/apache/jorphan/collections/ListedHashTree.java
|
Method name: void ListedHashTree(Collection>)
|
|
Method name: void ListedHashTree(Object[])
|
Number of AST nodes: 3
|
|
Number of AST nodes: 4
|
|
1 | public ListedHashTree(Collection<?> keys) {
| | 1 | public ListedHashTree(Object[] keys) {
|
2 | this();
| | 2 | this();
|
3 | for (Object temp : keys) {
| | 3 | for (int x = 0; x < keys.length; x++) {
|
4 | data.put(temp, new ListedHashTree());
| | 4 | Object temp = keys[x];
|
5 | order.add(temp);
| | 5 | data.put(temp, new ListedHashTree());
|
6 | }
| | 6 | order.add(tem |
7 | } | | | |
See real code fragment |
|
See real code fragment |
-
{Non-refactorable}
Mapping Summary
Number of mapped statements | 4 |
Number of unmapped statements in the first code fragment | 0 |
Number of unmapped statements in the second code fragment | 0 |
Time elapsed for statement mapping (ms) | 0.0 |
Similarity Score | 0.750 |
Clone type | Type 2 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
2 | for (Object temp : keys) | | 2 | for (int x = 0; x < keys.length; x++) |
| | | 3 | |
3 | data.put(temp, new ListedHashTree()); | | 4 | data.put(temp, new ListedHashTree()); |
4 | | | 5 | |
Precondition Violations (3)
Row |
Violation |
1 | Type java.util.Collection<> of variable keys does not match with type java.lang.Object[] of variable keys |
2 | Type java.util.Collection<> of variable keys does not match with type java.lang.Object[] of variable keys |
3 | Type java.util.Collection<> of variable keys does not match with type java.lang.Object[] of variable keys |