while (pe.hasMoreElements()) {
String key = (String) pe.nextElement();
String icons[] = JOrphanUtils.split(p.getProperty(key), " ");
iconlist[i][0] = key;
iconlist[i][1] = icons[0];
if (icons.length > 1){
iconlist[i][2] = icons[1];
}
i++;
}
while (pe.hasMoreElements()) {
String key = (String) pe.nextElement();
String icons[] = JOrphanUtils.split(p.getProperty(key), " ");//$NON-NLS-1$
iconlist[i][0] = key;
iconlist[i][1] = icons[0];
if (icons.length > 1) {
iconlist[i][2] = icons[1];
}
i++;
}
Clone fragments detected by clone detection tool
File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/JMeterReport.java
|
|
File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/JMeter.java
|
Method name: String[][] getIconMappings()
|
|
Method name: String[][] getIconMappings()
|
Number of AST nodes: 8
|
|
Number of AST nodes: 8
|
|
1 | while (pe.hasMoreElements()) {↵ | | 1 | while (pe.hasMoreElements()) {↵
|
2 | String key = (String) pe.nextElement();↵ | | 2 | String key = (String) pe.nextElement();↵
|
3 | String icons[] = JOrphanUtils.split(p.getProperty(key), " ");↵ | | 3 | String icons[] = JOrphanUtils.split(p.getProperty(key), " ");↵
|
4 | ↵ | | 4 | //$NON-NLS-1$↵
|
5 | iconlist[i][0] = key;↵ | | 5 | iconlist[i][0] = key;↵
|
6 | iconlist[i][1] = icons[0];↵ | | 6 | iconlist[i][1] = icons[0];↵
|
7 | if (icons.length > 1){↵ | | 7 | if (icons.length > 1) {↵
|
8 | iconlist[i][2] = icons[1];↵ | | 8 | iconlist[i][2] = icons[1];↵
|
9 | }↵ | | |
|
10 | i++;↵ | | |
|
11 | ↵ | | 9 | }↵
|
| | | 10 | i++;↵
|
12 | } | | 11 | }
|
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 in different classes |
Number of node comparisons | 40 |
-
{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) | 2.0 |
Clone type | Type 1 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
10 | while (pe.hasMoreElements()) | | 15 | while (pe.hasMoreElements()) |
11 | String key = (String)pe.nextElement(); | | 16 | String key = (String)pe.nextElement(); |
12 | String icons[] = JOrphanUtils.split(p.getProperty(key), " "); | | 17 | String icons[] = JOrphanUtils.split(p.getProperty(key), " "); |
13 | | | 18 | |
14 | iconlist[i][1] = icons[0]; | | 19 | iconlist[i][1] = icons[0]; |
15 | | | 20 | |
16 | iconlist[i][2] = icons[1]; | | 21 | iconlist[i][2] = icons[1]; |
17 | | | 22 | |
Precondition Violations (0)
Row |
Violation |