List tempList;
String[] h = getHeaders();
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);
}
}
size++;
List tempList;
String[] h = getHeaders();
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");
}
}
size++;
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[], String)
|
|
Method name: void setLine(String[])
|
Number of AST nodes: 8
|
|
Number of AST nodes: 8
|
|
1 | List tempList;↵ | | 1 | List tempList;↵
|
2 | String[] h = getHeaders();↵ | | 2 | String[] h = getHeaders();↵
|
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 | } else {↵ | | 7 | } else {↵
|
8 | tempList.add(deflt);↵ | | 8 | tempList.add("N/A");↵
|
9 | }↵ | | 9 | }↵
|
10 | }↵ | | 10 | }↵
|
11 | size++; | | 11 | size++;
|
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.5 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 18 |
-
{Refactorable}
Mapping Summary
Number of mapped statements | 8 |
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) | 8.8 |
Clone type | Type 2 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
1 | List tempList; | | 1 | List tempList; |
2 | String[] h = getHeaders(); | | 2 | String[] h = getHeaders(); |
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 | |
8 | size++; | | 8 | size++; |
Precondition Violations (0)
Row |
Violation |