String path;
String name;
URL url;
path = "org/columba/core/icons";
name = "image-missing.png";
if (small)
url = ResourceLoader.class.getResource(path + "/16x16/" + name);
else
url = ResourceLoader.class.getResource(path + "/22x22/" + name);
return url;
String path;
String name;
URL url;
path = "/org/columba/core/icons";
name = "image-missing.png";
if (small)
url = ResourceLoader.class.getResource(path + "/16x16/" + name);
else
url = ResourceLoader.class.getResource(path + "/22x22/" + name);
return url;
Clone fragments detected by clone detection tool
File path: /columba-1.4-src/calendar/src/main/java/org/columba/calendar/resourceloader/ResourceLoader.java
|
|
File path: /columba-1.4-src/plugins/org.columba.chat.altura/src/org/columba/chat/resourceloader/ResourceLoader.java
|
Method name: URL getFallback(boolean)
|
|
Method name: URL getFallback(boolean)
|
Number of AST nodes: 9
|
|
Number of AST nodes: 9
|
|
1 | String path;↵ | | 1 | String path;↵
|
2 | String name;↵ | | 2 | String name;↵
|
3 | URL url;↵ | | 3 | URL url;↵
|
4 | path = "org/columba/core/icons";↵ | | 4 | path = "/org/columba/core/icons";↵
|
5 | name = "image-missing.png";↵ | | 5 | name = "image-missing.png";↵
|
6 | if (small)↵ | | 6 | if (small)↵
|
|
7 | url = ResourceLoader.class.getResource(path + "/16x16/" + name);↵ | | 7 | url = ResourceLoader.class.getResource(path + "/16x16/" + name);↵
|
8 | else↵ | | 8 | else↵
|
9 | url = ResourceLoader.class.getResource(path + "/22x22/" + name);↵ | | 9 | url = ResourceLoader.class.getResource(path + "/22x22/" + name);↵
|
10 | return url; | | 10 | return url;
|
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.1 |
Clones location | Clones are in different classes |
Number of node comparisons | 45 |
-
{Refactorable}
Mapping Summary
Number of mapped statements | 9 |
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.1 |
Clone type | Type 2 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
1 | String path; | | 1 | String path; |
2 | String name; | | 2 | String name; |
3 | URL url; | | 3 | URL url; |
4 | path = "org/columba/core/icons"; | | 4 | path = "/org/columba/core/icons"; |
5 | name = "image-missing.png"; | | 5 | name = "image-missing.png"; |
6 | if (small) | | 6 | if (small) |
7 | url = ResourceLoader.class.getResource(path + "/16x16/" + name); | | 7 | url = ResourceLoader.class.getResource(path + "/16x16/" + name); |
| | | | |
8 | url = ResourceLoader.class.getResource(path + "/22x22/" + name); | | 8 | url = ResourceLoader.class.getResource(path + "/22x22/" + name); |
9 | return url; | | 9 | return url; |
Precondition Violations (0)
Row |
Violation |