File path: /sql12/plugins/smarttools/src/net/sourceforge/squirrel_sql/plugins/smarttools/SmarttoolsHelper.java | File path: /sql12/plugins/firebirdmanager/src/net/sourceforge/squirrel_sql/plugins/firebirdmanager/FirebirdManagerHelper.java | |||
Method name: ImageIcon loadIcon(String)
|
Method name: ImageIcon loadIcon(String)
|
|||
Number of AST nodes: 5 | Number of AST nodes: 5 | |||
1 | URL imgURL = SmarttoolsPlugin.class.getResource("images/" + imageIconName);↵ | 1 | URL imgURL = FirebirdManagerPlugin.class.getResource("images/" + imageIconName);↵ | |
2 | if (imgURL != null)↵ | 2 | if (imgURL != null)↵ | |
3 | {↵ | |||
4 | ↵ | 3 | {↵ | |
5 | return new ImageIcon(imgURL);↵ | 4 | return new ImageIcon(imgURL);↵ | |
6 | }↵ | |||
7 | else↵ | |||
8 | {↵ | |||
9 | ↵ | 5 | } else {↵ | |
10 | log.error("Couldn't find file: images/" + imageIconName);↵ | 6 | log.error("Couldn't find file: images/" + imageIconName);↵ | |
11 | return null;↵ | 7 | return null;↵ | |
12 | } | 8 | } | |
See real code fragment | See real code fragment |
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 | 17 |
Number of mapped statements | 5 |
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.4 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | URL imgURL = SmarttoolsPlugin.class.getResource("images/" + imageIconName); |
| 1 | URL imgURL = FirebirdManagerPlugin.class.getResource("images/" + imageIconName); | ||||||||||
2 | if (imgURL != null) | 2 | if (imgURL != null) | |||||||||||
3 | return new ImageIcon(imgURL); | 3 | return new ImageIcon(imgURL); | |||||||||||
else | else | |||||||||||||
4 | log.error("Couldn't find file: images/" + imageIconName); | 4 | log.error("Couldn't find file: images/" + imageIconName); | |||||||||||
5 | return null; | 5 | return null; |
Row | Violation |
---|