try { handler = PluginManager.getInstance() .getExtensionHandler(IExtensionHandlerKeys.ORG_COLUMBA_CORE_EXTERNALTOOLS); } catch (PluginHandlerNotFoundException e) { e.printStackTrace(); } initComponents();
try { handler = PluginManager.getInstance().getExtensionHandler( IExtensionHandlerKeys.ORG_COLUMBA_MAIL_FOLDEROPTIONS); } catch (PluginHandlerNotFoundException e) { // TODO (@author fdietz): show error dialoghere e.printStackTrace(); }
Clone fragments detected by clone detection tool
File path: /columba-1.4-src/core/src/main/java/org/columba/core/gui/externaltools/ExternalToolsDialog.java File path: /columba-1.4-src/mail/src/main/java/org/columba/mail/folderoptions/FolderOptionsController.java
Method name: void ExternalToolsDialog() Method name: void FolderOptionsController(MailFrameMediator)
Number of AST nodes: 3 Number of AST nodes: 2
1
try {
1
try {
2
			handler = PluginManager.getInstance()
2
			handler = PluginManager.getInstance()
3
					.getExtensionHandler(
3
.getExtensionHandler(
4
IExtensionHandlerKeys.ORG_COLUMBA_CORE_EXTERNALTOOLS);
4
					IExtensionHandlerKeys.ORG_COLUMBA_MAIL_FOLDEROPTIONS);
5
		} catch (PluginHandlerNotFoundException e) {
5
		} catch (PluginHandlerNotFoundException e) {
6
			
6
			// TODO (@author fdietz): show error dialoghere
7
e.printStackTrace();
7
			e.printStackTrace();
8
		}
8
		}
9
		initComponents();
Summary
Number of common nesting structure subtrees1
Number of refactorable cases0
Number of non-refactorable cases1
Time elapsed for finding largest common nesting structure subtrees (ms)0.2
Clones locationClones are in different classes
Number of node comparisons4
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements2
    Number of unmapped statements in the first code fragment1
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)1.1
    Clone typeType 3
    Mapped Statements
    ID Statement ID Statement
    3
    try
    2
    try
    4
    handler = PluginManager.getInstance().getExtensionHandler(IExtensionHandlerKeys.ORG_COLUMBA_CORE_EXTERNALTOOLS);
    4
    handler = PluginManager.getInstance().getExtensionHandler(IExtensionHandlerKeys.ORG_COLUMBA_CORE_EXTERNALTOOLS);
    3
    handler = PluginManager.getInstance().getExtensionHandler(IExtensionHandlerKeys.ORG_COLUMBA_MAIL_FOLDEROPTIONS);
    Differences
    Expression1Expression2Difference
    org.columba.api.plugin.IExtensionHandlerKeysorg.columba.mail.plugin.IExtensionHandlerKeysVARIABLE_TYPE_MISMATCH
    ORG_COLUMBA_CORE_EXTERNALTOOLSORG_COLUMBA_MAIL_FOLDEROPTIONSVARIABLE_NAME_MISMATCH
    Preondition Violations
    Type org.columba.api.plugin.IExtensionHandlerKeys does not match with type org.columba.mail.plugin.IExtensionHandlerKeys
    • Make classes org.columba.api.plugin.IExtensionHandlerKeys and org.columba.mail.plugin.IExtensionHandlerKeys extend a common superclass
    3
    handler = PluginManager.getInstance().getExtensionHandler(IExtensionHandlerKeys.ORG_COLUMBA_MAIL_FOLDEROPTIONS);
    5
    initComponents();
    5
    initComponents();
    Preondition Violations
    Unmatched statement initComponents(); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
                                            
    Precondition Violations (3)
    Row Violation
    1Type org.columba.api.plugin.IExtensionHandlerKeys does not match with type org.columba.mail.plugin.IExtensionHandlerKeys
    2Unmatched statement initComponents(); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
    3The refactoring of the clones is infeasible, because classes org.columba.core.gui.externaltools.ExternalToolsDialog and org.columba.mail.folderoptions.FolderOptionsController do not have a common superclass