private static IHTMLViewerPlugin createHTMLViewerPluginInstance( String pluginId) { IHTMLViewerPlugin plugin = null; try { 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; } catch (PluginHandlerNotFoundException e) { LOG.severe("Error while loading viewer plugin: " + e.getMessage()); if (Logging.DEBUG) e.printStackTrace(); } catch (PluginException e) { LOG.severe("Error while loading viewer plugin: " + e.getMessage()); if (Logging.DEBUG) e.printStackTrace(); } return null;
private IHTMLViewerPlugin createHTMLViewerPluginInstance(String pluginId) { IHTMLViewerPlugin plugin = null; try { 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; } catch (PluginHandlerNotFoundException e) { LOG.severe("Error while loading viewer plugin: " + e.getMessage()); if (Logging.DEBUG) e.printStackTrace(); } catch (PluginException e) { LOG.severe("Error while loading viewer plugin: " + e.getMessage()); if (Logging.DEBUG) e.printStackTrace(); } return null;
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: Method name:
Number of AST nodes: 0 Number of AST nodes: 0
1
private static IHTMLViewerPlugin createHTMLViewerPluginInstance(
1
private IHTMLViewerPlugin createHTMLViewerPluginInstance(
2
			String pluginId) {
2
String pluginId) {
3
		IHTMLViewerPlugin plugin = null;
3
		IHTMLViewerPlugin plugin = null;
4
		try {
4
		try {
5
			IExtensionHandler handler = PluginManager.getInstance()
5
			IExtensionHandler handler = PluginManager.getInstance()
6
					.getExtensionHandler(
6
					.getExtensionHandler(
7
							IExtensionHandlerKeys.ORG_COLUMBA_CORE_HTMLVIEWER);
7
							IExtensionHandlerKeys.ORG_COLUMBA_CORE_HTMLVIEWER);
8
			IExtension extension = handler.getExtension(pluginId);
8
			IExtension extension = handler.getExtension(pluginId);
9
			if (extension == null)
9
			if (extension == null)
10
				return null;
10
				return null;
11
			plugin = (IHTMLViewerPlugin) extension.instanciateExtension(null);
11
			plugin = (IHTMLViewerPlugin) extension.instanciateExtension(null);
12
			return plugin;
12
			return plugin;
13
		} catch (PluginHandlerNotFoundException e) {
13
		} catch (PluginHandlerNotFoundException e) {
14
			LOG.severe("Error while loading viewer plugin: " + e.getMessage());
14
			LOG.severe("Error while loading viewer plugin: " + e.getMessage());
15
			if (Logging.DEBUG)
15
			if (Logging.DEBUG)
16
				e.printStackTrace();
16
				e.printStackTrace();
17
		} catch (PluginException e) {
17
		} catch (PluginException e) {
18
			LOG.severe("Error while loading viewer plugin: " + e.getMessage());
18
			LOG.severe("Error while loading viewer plugin: " + e.getMessage());
19
			if (Logging.DEBUG)
19
			if (Logging.DEBUG)
20
				e.printStackTrace();
20
				e.printStackTrace();
21
		}
21
		}
22
		return null;
22
		return null;
23
	
23
	
Summary
Number of common nesting structure subtrees0
Number of refactorable cases0
Number of non-refactorable cases0
Time elapsed for finding largest common nesting structure subtrees (ms)0.0
Clones location
Number of node comparisons0