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;
Summary
Number of common nesting structure subtrees1
Number of refactorable cases1
Number of non-refactorable cases0
Time elapsed for finding largest common nesting structure subtrees (ms)0.6
Clones locationClones are in different classes
Number of node comparisons13
  1. {Refactorable}
    Mapping Summary
    Number of mapped statements6
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)0.9
    Clone typeType 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
    return null;
    6
    return null;
    7
    plugin = (IHTMLViewerPlugin)extension.instanciateExtension(null);
    7
    plugin = (IHTMLViewerPlugin)extension.instanciateExtension(null);
    8
    return plugin;
    8
    return plugin;
    Precondition Violations (0)
    Row Violation