String columnName = (String) header.get(column);
try {
if (currentPos < size) {
return ((List) data.get(columnName)).get(currentPos);
} else {
return null;
}
} catch (Exception e) {
return null;
}
try {
if (currentPos < size) {
return ((List) data.get(column)).get(currentPos);
} else {
return null;
}
} catch (Exception e) {
return null;
}
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: Object getColumnValue(int)
|
|
Method name: Object getColumnValue(String)
|
Number of AST nodes: 5
|
|
Number of AST nodes: 4
|
|
1 | String columnName = (String) header.get(column);↵ | | |
|
2 | try {↵ | | 1 | try {↵
|
3 | if (currentPos < size) {↵ | | 2 | if (currentPos < size) {↵
|
4 | return ((List) data.get(columnName)).get(currentPos);↵ | | 3 | return ((List) data.get(column)).get(currentPos);↵
|
5 | } else {↵ | | 4 | } else {↵
|
6 | return null;↵ | | 5 | return null;↵
|
7 | }↵ | | 6 | }↵
|
8 | } catch (Exception e) {↵ | | 7 | } catch (Exception e) {↵
|
9 | return null;↵ | | 8 | return null;↵
|
10 | } | | 9 | }
|
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.2 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 10 |
-
{Refactorable}
Mapping Summary
Number of mapped statements | 4 |
Number of unmapped statements in the first code fragment | 1 |
Number of unmapped statements in the second code fragment | 0 |
Time elapsed for statement mapping (ms) | 1.0 |
Clone type | Type 3 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
1 | String columnName = (String)header.get(column); | | | |
2 | try | | 1 | try |
3 | | | 2 | |
4 | return ((List)data.get(columnName)).get(currentPos); | | 3 | return ((List)data.get(column)).get(currentPos); |
| | | | |
5 | | | 4 | |
Precondition Violations (0)
Row |
Violation |