File path: /jEdit-4.2/src/org/gjt/sp/jedit/jEdit.java | File path: /jEdit-4.2/src/org/gjt/sp/jedit/jEdit.java | |||
Method name: void initSiteProperties()
|
Method name: void addPluginJARsFromDirectory(String)
|
|||
Number of AST nodes: 6 | Number of AST nodes: 6 | |||
1 | File siteSettings = new File(siteSettingsDirectory);↵ | 1 | File file = new File(directory);↵ | |
2 | if (!(siteSettings.exists() && siteSettings.isDirectory()))↵ | 2 | if(!(file.exists() && file.isDirectory()))↵ | |
3 | return;↵ | 3 | return;↵ | |
4 | String[] snippets = siteSettings.list();↵ | 4 | String[] plugins = file.list();↵ | |
5 | if (snippets == null)↵ | 5 | if(plugins == null)↵ | |
6 | return; | 6 |
| |
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.6 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 18 |
Number of mapped statements | 6 |
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.5 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
2 | File siteSettings = new File(siteSettingsDirectory); |
| 2 | File file = new File(directory); | |||||||||||||
3 | if (!(siteSettings.exists() && siteSettings.isDirectory())) |
| 3 | if (!(file.exists() && file.isDirectory())) | |||||||||||||
4 | return; |
| 4 | return; | |||||||||||||
5 | String[] snippets = siteSettings.list(); |
| 5 | String[] plugins = file.list(); | |||||||||||||
6 | if (snippets == null) |
| 6 | if (plugins == null) | |||||||||||||
7 | return; |
| 7 | return; |
Row | Violation |
---|---|
1 | Conditional return; |
2 | Conditional return; |
3 | Conditional return; |
4 | Conditional return; |