IExtensionHandler handler = PluginManager.getInstance()
.getExtensionHandler(
IExtensionHandlerKeys.ORG_COLUMBA_CORE_HTMLVIEWER);
IExtension extension = handler.getExtension(pluginId);
if (extension == null)
return null;
plugin = (IHTMLViewerPlugin) extension.instanciateExtension(null);
return plugin;
IExtensionHandler handler = PluginManager.getInstance()
.getExtensionHandler(
IExtensionHandlerKeys.ORG_COLUMBA_CORE_HTMLVIEWER);
IExtension extension = handler.getExtension(pluginId);
if (extension == null)
return null;
plugin = (IHTMLViewerPlugin) extension.instanciateExtension(null);
return plugin;
Clone fragments detected by clone detection tool
File path: /columba-1.4-src/core/src/main/java/org/columba/core/gui/htmlviewer/HTMLViewerFactory.java
|
|
File path: /columba-1.4-src/mail/src/main/java/org/columba/mail/gui/message/viewer/TextViewer.java
|
Method name: IHTMLViewerPlugin createHTMLViewerPluginInstance(String)
|
|
Method name: IHTMLViewerPlugin createHTMLViewerPluginInstance(String)
|
Number of AST nodes: 6
|
|
Number of AST nodes: 6
|
|
1 | IExtensionHandler handler = PluginManager.getInstance()↵ | | 1 | IExtensionHandler handler = PluginManager.getInstance()↵
|
2 | .getExtensionHandler(↵ | | 2 | .getExtensionHandler(↵
|
3 | IExtensionHandlerKeys.ORG_COLUMBA_CORE_HTMLVIEWER);↵ | | 3 | 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;
|
See real code fragment |
|
See real code fragment |
Summary
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.6 |
Clones location | Clones are in different classes |
Number of node comparisons | 13 |
-
{Refactorable}
Mapping Summary
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) | 0.9 |
Clone type | Type 1 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
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 | | | 6 | |
7 | plugin = (IHTMLViewerPlugin)extension.instanciateExtension(null); | | 7 | plugin = (IHTMLViewerPlugin)extension.instanciateExtension(null); |
8 | return plugin; | | 8 | return plugin; |
Precondition Violations (0)
Row |
Violation |