AbstractFilterAction instance = null; // try to get instance of FilterAction try { IExtension extension = pluginHandler.getExtension(name); instance = (AbstractFilterAction) extension .instanciateExtension(null); } catch (Exception ex) { ex.printStackTrace(); }
AbstractExternalToolsPlugin plugin = null; try { IExtension extension = handler.getExtension(selection); plugin = (AbstractExternalToolsPlugin) extension .instanciateExtension(null); } catch (Exception e1) { e1.printStackTrace(); }
Clone fragments detected by clone detection tool
File path: /columba-1.4-src/mail/src/main/java/org/columba/mail/filter/FilterCompoundCommand.java File path: /columba-1.4-src/core/src/main/java/org/columba/core/gui/externaltools/ExternalToolsDialog.java
Method name: void FilterCompoundCommand(IFilter, IFolder, Object[]) Method name: void actionPerformed(ActionEvent)
Number of AST nodes: 4 Number of AST nodes: 4
1
AbstractFilterAction instance = null;
1
Abstract
2
			// try to get instance of FilterAction
2
ExternalToolsPlugin plugin = null;
3
			try {
3
			try {
4
				IExtension extension = pluginHandler.getExtension(name);
4
				IExtension extension = handler.getExtension(
5
				instance = (AbstractFilterActio
5
selection);
6
n) extension
6
				plugin = (AbstractExternalToolsPlugin) extension
7
						.instanciateExtension(null);
7
						.instanciateExtension(null);
8
			} catch (Exception ex) {
8
			} catch (Exception e1) {
9
				ex.printStackTrace();
9
				e1.printStackTrace();
10
			}
10
			}
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 comparisons11
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements2
    Number of unmapped statements in the first code fragment2
    Number of unmapped statements in the second code fragment2
    Time elapsed for statement mapping (ms)1.6
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
                                                                                          
    7
    AbstractExternalToolsPlugin plugin = null;
    7
    AbstractFilterAction instance = null;
                                                                                
    8
    try
    8
    try
    8
    try
    Differences
    Expression1Expression2Difference
    exe1VARIABLE_NAME_MISMATCH
    exe1VARIABLE_NAME_MISMATCH
    8
    try
    9
    IExtension extension = pluginHandler.getExtension(name);
    9
    IExtension extension = pluginHandler.getExtension(name);
    9
    IExtension extension = handler.getExtension(selection);
    Differences
    Expression1Expression2Difference
    nameselectionVARIABLE_NAME_MISMATCH
    pluginHandlerhandlerVARIABLE_NAME_MISMATCH
    9
    IExtension extension = handler.getExtension(selection);
                                                                                                                                                              
    10
    plugin = (AbstractExternalToolsPlugin)extension.instanciateExtension(null);
    Preondition Violations
    Unmatched statement plugin=(AbstractExternalToolsPlugin)extension.instanciateExtension(null); cannot be moved before or after the extracted code, because it throws exception(s) that should be caught by a try block that will be extracted
    10
    plugin = (AbstractExternalToolsPlugin)extension.instanciateExtension(null);
    10
    instance = (AbstractFilterAction)extension.instanciateExtension(null);
    10
    instance = (AbstractFilterAction)extension.instanciateExtension(null);
    Preondition Violations
    Unmatched statement instance=(AbstractFilterAction)extension.instanciateExtension(null); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    Unmatched statement instance=(AbstractFilterAction)extension.instanciateExtension(null); cannot be moved before or after the extracted code, because it throws exception(s) that should be caught by a try block that will be extracted
                                                                                                                                                    
    Precondition Violations (3)
    Row Violation
    1Unmatched statement plugin=(AbstractExternalToolsPlugin)extension.instanciateExtension(null); cannot be moved before or after the extracted code, because it throws exception(s) that should be caught by a try block that will be extracted
    2Unmatched statement instance=(AbstractFilterAction)extension.instanciateExtension(null); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    3Unmatched statement instance=(AbstractFilterAction)extension.instanciateExtension(null); cannot be moved before or after the extracted code, because it throws exception(s) that should be caught by a try block that will be extracted