File path: /columba-1.4-src/mail/src/main/java/org/columba/mail/gui/message/viewer/TextViewer.java | File path: /columba-1.4-src/core/src/main/java/org/columba/core/gui/htmlviewer/HTMLViewerFactory.java | |||
Method name: IHTMLViewerPlugin createHTMLViewerPluginInstance(String)
|
Method name: IHTMLViewerPlugin createHTMLViewerPluginInstance(String)
|
|||
Number of AST nodes: 9 | Number of AST nodes: 9 | |||
1 | IHTMLViewerPlugin plugin = null;↵ | 1 | IHTMLViewerPlugin plugin = null;↵ | |
2 | try {↵ | 2 | try {↵ | |
3 | IExtensionHandler handler = PluginManager.getInstance()↵ | 3 | IExtensionHandler handler = PluginManager.getInstance()↵ | |
4 | .getExtensionHandler(↵ | 4 | .getExtensionHandler(↵ | |
5 | IExtensionHandlerKeys.ORG_COLUMBA_CORE_HTMLVIEWER);↵ | 5 | IExtensionHandlerKeys.ORG_COLUMBA_CORE_HTMLVIEWER);↵ | |
6 | IExtension extension = handler.getExtension(pluginId);↵ | 6 | IExtension extension = handler.getExtension(pluginId);↵ | |
7 | if (extension == null)↵ | 7 | if (extension == null)↵ | |
8 | return null;↵ | 8 | return null;↵ | |
9 | plugin = (IHTMLViewerPlugin) extension.instanciateExtension(null);↵ | 9 | plugin = (IHTMLViewerPlugin) extension.instanciateExtension(null);↵ | |
10 | return plugin;↵ | 10 | return plugin;↵ | |
11 | } catch (PluginHandlerNotFoundException e) {↵ | 11 | } catch (PluginHandlerNotFoundException e) {↵ | |
12 | LOG.severe("Error while loading viewer plugin: " + e.getMessage());↵ | 12 | LOG.severe("Error while loading viewer plugin: " + e.getMessage());↵ | |
13 | if (Logging.DEBUG)↵ | 13 | if (Logging.DEBUG)↵ | |
14 | e.printStackTrace();↵ | 14 | e.printStackTrace();↵ | |
15 | } catch (PluginException e) {↵ | 15 | } catch (PluginException e) {↵ | |
16 | LOG.severe("Error while loading viewer plugin: " + e.getMessage());↵ | 16 | LOG.severe("Error while loading viewer plugin: " + e.getMessage());↵ | |
17 | if (Logging.DEBUG)↵ | 17 | if (Logging.DEBUG)↵ | |
18 | e.printStackTrace();↵ | 18 | e.printStackTrace();↵ | |
19 | }↵ | 19 | }↵ | |
20 | return null; | 20 |
| |
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) | 1.1 |
Clones location | Clones are in different classes |
Number of node comparisons | 33 |
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) | 3.2 |
Clone type | Type 1 |
ID | Statement | ID | Statement | |
---|---|---|---|---|
1 | IHTMLViewerPlugin plugin = null; | 1 | IHTMLViewerPlugin plugin = null; | |
2 | try | 2 | try | |
3 | IExtensionHandler handler = PluginManager.getInstance().getExtensionHandler(IExtensionHandlerKeys.ORG_COLUMBA_CORE_HTMLVIEWER); | 3 | IExtensionHandler handler = PluginManager.getInstance().getExtensionHandler(IExtensionHandlerKeys.ORG_COLUMBA_CORE_HTMLVIEWER); | |
4 | IExtension extension = handler.getExtension(pluginId); | 4 | IExtension extension = handler.getExtension(pluginId); | |
5 | if (extension == null) | 5 | if (extension == null) | |
6 | return null; | 6 | return null; | |
7 | plugin = (IHTMLViewerPlugin)extension.instanciateExtension(null); | 7 | plugin = (IHTMLViewerPlugin)extension.instanciateExtension(null); | |
8 | return plugin; | 8 | return plugin; | |
9 | return null; | 9 | return null; |
Row | Violation |
---|