for (int count = 0; count < h.length; count++) {
tempList = (List) data.get(h[count]);
if (count < line.length && line[count].length() > 0) {
tempList.add(line[count]);
} else {
tempList.add("N/A");
}
}
for (int count = 0; count < h.length; count++) {
tempList = (List) data.get(h[count]);
if (count < line.length && line[count].length() > 0) {
tempList.add(line[count]);
} else {
tempList.add(deflt);
}
}
Clone fragments detected by clone detection tool
File path: /jakarta-jmeter-2.3.2/src/org/apache/jorphan/collections/Data.java
|
|
File path: /jakarta-jmeter-2.3.2/src/org/apache/jorphan/collections/Data.java
|
Method name: void setLine(String[])
|
|
Method name: void setLine(String[], String)
|
Number of AST nodes: 5
|
|
Number of AST nodes: 5
|
|
1 | for (int count = 0; count < h.length; count++) {↵ | | 1 | for (int count = 0; count < h.length; count++) {↵
|
2 | tempList = (List) data.get(h[count]);↵ | | 2 | tempList = (List) data.get(h[count]);↵
|
3 | if (count < line.length && line[count].length() > 0) {↵ | | 3 | if (count < line.length && line[count].length() > 0) {↵
|
4 | tempList.add(line[count]);↵ | | 4 | tempList.add(line[count]);↵
|
5 | } else {↵ | | 5 | } else {↵
|
6 | tempList.add("N/A");↵ | | 6 | tempList.add(deflt);↵
|
7 | }↵ | | 7 | }↵
|
8 | } | | 8 | }
|
See real code fragment |
|
See real code fragment |
Summary
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 1 |
Number of non-refactorable cases | 0 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.4 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 13 |
-
{Refactorable}
Mapping Summary
Number of mapped statements | 5 |
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) | 6.6 |
Clone type | Type 2 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
3 | for (int count = 0; count < h.length; count++) | | 3 | for (int count = 0; count < h.length; count++) |
4 | tempList = (List)data.get(h[count]); | | 4 | tempList = (List)data.get(h[count]); |
5 | if (count < line.length && line[count].length() > 0) | | 5 | if (count < line.length && line[count].length() > 0) |
6 | tempList.add(line[count]); | | 6 | tempList.add(line[count]); |
| | | | |
7 | | | 7 | |
Precondition Violations (0)
Row |
Violation |