File path: /sql12/plugins/laf/src/net/sourceforge/squirrel_sql/plugins/laf/OyoahaLookAndFeelController.java | File path: /sql12/plugins/laf/src/net/sourceforge/squirrel_sql/plugins/laf/SkinLookAndFeelController.java | |||
Method name: void OyoahaLookAndFeelController(LAFPlugin)
|
Method name: void SkinLookAndFeelController(LAFPlugin)
|
|||
Number of AST nodes: 12 | Number of AST nodes: 12 | |||
1 | super();↵ | 1 | super();↵ | |
2 | XMLObjectCache cache = plugin.getSettingsCache();↵ | 2 | XMLObjectCache cache = plugin.getSettingsCache();↵ | |
3 | Iterator<?> it = cache.getAllForClass(OyoahaPreferences.class);↵ | 3 | Iterator<?> it = cache.getAllForClass(SkinPreferences.class);↵ | |
4 | if (it.hasNext())↵ | 4 | if (it.hasNext())↵ | |
5 | {↵ | 5 | {↵ | |
6 | _prefs = (OyoahaPreferences)it.next();↵ | 6 | _prefs = (SkinPreferences)it.next();↵ | |
7 | }↵ | 7 | }↵ | |
8 | else↵ | 8 | else↵ | |
9 | {↵ | 9 | {↵ | |
10 | _prefs = new OyoahaPreferences();↵ | 10 | _prefs = new SkinPreferences();↵ | |
11 | try↵ | 11 | try↵ | |
12 | {↵ | 12 | {↵ | |
13 | cache.add(_prefs);↵ | 13 | cache.add(_prefs);↵ | |
14 | }↵ | 14 | }↵ | |
15 | catch (DuplicateObjectException ex)↵ | 15 | catch (DuplicateObjectException ex)↵ | |
16 | {↵ | 16 | {↵ | |
17 | s_log.error("OyoahaPreferences object already in XMLObjectCache", ex);↵ | 17 | s_log.error("SkinPreferences object already in XMLObjectCache", ex);↵ | |
18 | }↵ | 18 | }↵ | |
19 | }↵ | 19 | }↵ | |
20 | // Folder that stores themepacks for this LAF.↵ | 20 | // Folder that stores themepacks for this LAF.↵ | |
21 | File themePackDir = new File(plugin.getPluginAppSettingsFolder(), "oyoaha-theme-packs");↵ | 21 | File themePackDir = new File(plugin.getPluginAppSettingsFolder(), "skinlf-theme-packs");↵ | |
22 | _prefs.setThemePackDirectory(themePackDir.getAbsolutePath());↵ | 22 | _prefs.setThemePackDirectory(themePackDir.getAbsolutePath());↵ | |
23 | if (!themePackDir.exists())↵ | 23 | if (!themePackDir.exists())↵ | |
24 | {↵ | 24 | {↵ | |
25 | themePackDir.mkdirs();↵ | 25 | themePackDir.mkdirs();↵ | |
26 | } | 26 |
| |
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.8 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 36 |
Number of mapped statements | 12 |
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) | 6.2 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | super(); |
| 1 | super(); | |||||||||||||||
2 | XMLObjectCache cache = plugin.getSettingsCache(); | 2 | XMLObjectCache cache = plugin.getSettingsCache(); | ||||||||||||||||
3 | Iterator<?> it = cache.getAllForClass(OyoahaPreferences.class); |
| 3 | Iterator<?> it = cache.getAllForClass(SkinPreferences.class); | |||||||||||||||
4 | if (it.hasNext()) | 4 | if (it.hasNext()) | ||||||||||||||||
5 | _prefs = (OyoahaPreferences)it.next(); |
| 5 | _prefs = (SkinPreferences)it.next(); | |||||||||||||||
else | else | ||||||||||||||||||
6 | _prefs = new OyoahaPreferences(); |
| 6 | _prefs = new SkinPreferences(); | |||||||||||||||
7 | try |
| 7 | try | |||||||||||||||
8 | cache.add(_prefs); |
| 8 | cache.add(_prefs); | |||||||||||||||
9 | File themePackDir = new File(plugin.getPluginAppSettingsFolder(), "oyoaha-theme-packs"); |
| 9 | File themePackDir = new File(plugin.getPluginAppSettingsFolder(), "skinlf-theme-packs"); | |||||||||||||||
10 | _prefs.setThemePackDirectory(themePackDir.getAbsolutePath()); |
| 10 | _prefs.setThemePackDirectory(themePackDir.getAbsolutePath()); | |||||||||||||||
11 | if (!themePackDir.exists()) | 11 | if (!themePackDir.exists()) | ||||||||||||||||
12 | themePackDir.mkdirs(); | 12 | themePackDir.mkdirs(); |
Row | Violation |
---|---|
1 | Super constructor call super(); cannot be extracted from constructor |
2 | Super constructor call super(); cannot be extracted from constructor |
3 | Expression (OyoahaPreferences)it.next() cannot be parameterized, because it has dependencies to/from statements that will be extracted |
4 | Expression (SkinPreferences)it.next() cannot be parameterized, because it has dependencies to/from statements that will be extracted |
5 | Expression _prefs cannot be unified with expression _prefs , because common superclass net.sourceforge.squirrel_sql.fw.id.IHasIdentifier does not declare member(s) public void setThemePackDirectory(java.lang.String) |