File path: /columba-1.4-src/core/src/main/java/org/columba/core/resourceloader/ImageLoader.java | File path: /columba-1.4-src/plugins/org.columba.chat.altura/src/org/columba/chat/resourceloader/ResourceLoader.java | |||
Method name: ImageIcon getIcon(String, String, boolean)
|
Method name: ImageIcon getIcon(String, String, boolean)
|
|||
Number of AST nodes: 8 | Number of AST nodes: 8 | |||
1 | URL url;↵ | 1 | URL url;↵ | |
2 | if (small)↵ | 2 | if (small)↵ | |
3 | url = DiskIO.getResourceURL(path + "/16x16/" + name);↵ | 3 | url = ResourceLoader.class.getResource(path + "/16x16/" + name);↵ | |
4 | else↵ | 4 | else↵ | |
5 | url = DiskIO.getResourceURL(path + "/22x22/" + name);↵ | 5 | url = ResourceLoader.class.getResource(path + "/22x22/" + name);↵ | |
6 | if (url == null) {↵ | 6 | if (url == null)↵ | |
7 | url = getFallback(small);↵ | 7 | url = getFallback(small);↵ | |
8 | }↵ | |||
9 | ImageIcon icon = new ImageIcon(url);↵ | 8 | ImageIcon icon = new ImageIcon(url);↵ | |
10 | return icon; | 9 |
| |
See real code fragment | See real code fragment |
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 0 |
Number of non-refactorable cases | 1 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.2 |
Clones location | Clones are in different classes |
Number of node comparisons | 25 |
Number of mapped statements | 6 |
Number of unmapped statements in the first code fragment | 2 |
Number of unmapped statements in the second code fragment | 2 |
Time elapsed for statement mapping (ms) | 1.4 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||
---|---|---|---|---|---|---|---|
1 | URL url; | 1 | URL url; | ||||
2 | if (small) | 2 | if (small) | ||||
|
| 3 | url = ResourceLoader.class.getResource(path + "/16x16/" + name); | ||||
3 | url = DiskIO.getResourceURL(path + "/16x16/" + name); |
| | ||||
else | | ||||||
|
| 4 | url = ResourceLoader.class.getResource(path + "/22x22/" + name); | ||||
4 | url = DiskIO.getResourceURL(path + "/22x22/" + name); |
| | ||||
5 | if (url == null) | 5 | if (url == null) | ||||
6 | url = getFallback(small); | 6 | url = getFallback(small); | ||||
7 | ImageIcon icon = new ImageIcon(url); | 7 | ImageIcon icon = new ImageIcon(url); | ||||
8 | return icon; | 8 | return icon; |
Row | Violation |
---|---|
1 | Unmatched statement url=ResourceLoader.class.getResource(path + "/16x16/" + name); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
2 | Unmatched statement url=DiskIO.getResourceURL(path + "/16x16/" + name); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
3 | Unmatched statement url=ResourceLoader.class.getResource(path + "/22x22/" + name); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
4 | Unmatched statement url=DiskIO.getResourceURL(path + "/22x22/" + name); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |