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