try { FrameManager.getInstance().openView("ThreePaneMail"); } catch (PluginLoadingFailedException e) { e.printStackTrace(); }
try { Desktop.browse(url); } catch (DesktopException e) { JOptionPane.showMessageDialog(FrameManager.getInstance() .getActiveFrame(), GlobalResourceLoader.getString( "org.columba.core.i18n.dialog", "error", "no_browser"), "Error", JOptionPane.ERROR_MESSAGE); }
Clone fragments detected by clone detection tool
File path: /columba-1.4-src/core/src/main/java/org/columba/core/gui/globalactions/OpenNewMailWindowAction.java File path: /columba-1.4-src/core/src/main/java/org/columba/core/desktop/JDICDesktop.java
Method name: void actionPerformed(ActionEvent) Method name: void browse(URL)
Number of AST nodes: 2 Number of AST nodes: 2
1
try {
1
try {
2
			FrameManager.getInstance().openView("ThreePaneMail");
2
			
3
		} catch (PluginLoadingFailedException e) {
4
			e.printStackTrace(
3
Desktop.browse(url);
4
		} catch (DesktopException e) {
5
			JOptionPane.showMessageDialog(FrameManager.getInstance()
6
					.getActiveFrame(), GlobalResourceLoader.getString(
7
					"org.columba.core.i18n.dialog", "error", "no_browser"),
5
);
8
					"Error", JOptionPane.ERROR_MESSAGE);
6
		}
9
		}
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.4
Clones locationClones are in different classes
Number of node comparisons4
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements1
    Number of unmapped statements in the first code fragment1
    Number of unmapped statements in the second code fragment1
    Time elapsed for statement mapping (ms)20.9
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    try
    1
    try
    1
    try
    Differences
    Expression1Expression2Difference
    org.columba.api.plugin.PluginLoadingFailedExceptionorg.jdesktop.jdic.desktop.DesktopExceptionSUBCLASS_TYPE_MISMATCH
    org.columba.api.plugin.PluginLoadingFailedExceptionorg.jdesktop.jdic.desktop.DesktopExceptionSUBCLASS_TYPE_MISMATCH
    printStackTraceshowMessageDialogMETHOD_INVOCATION_NAME_MISMATCH
    org.columba.api.plugin.PluginLoadingFailedExceptionjavax.swing.JOptionPaneVARIABLE_TYPE_MISMATCH
    e.printStackTrace()JOptionPane.showMessageDialog(FrameManager.getInstance().getActiveFrame(),GlobalResourceLoader.getString("org.columba.core.i18n.dialog","error","no_browser"),"Error",JOptionPane.ERROR_MESSAGE)TYPE_COMPATIBLE_REPLACEMENT
    e.printStackTrace()JOptionPane.showMessageDialog(FrameManager.getInstance().getActiveFrame(),GlobalResourceLoader.getString("org.columba.core.i18n.dialog","error","no_browser"),"Error",JOptionPane.ERROR_MESSAGE)ARGUMENT_NUMBER_MISMATCH
    Preondition Violations
    Expression e.printStackTrace() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression e.printStackTrace() is a void method call, and thus it cannot be parameterized
    Expression JOptionPane.showMessageDialog(FrameManager.getInstance().getActiveFrame(),GlobalResourceLoader.getString("org.columba.core.i18n.dialog","error","no_browser"),"Error",JOptionPane.ERROR_MESSAGE) is a void method call, and thus it cannot be parameterized
    Expression e cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Type org.columba.api.plugin.PluginLoadingFailedException of variable e does not match with type javax.swing.JOptionPane of variable JOptionPane
    • Make classes org.columba.api.plugin.PluginLoadingFailedException and javax.swing.JOptionPane extend a common superclass
    Expression e.printStackTrace() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression e.printStackTrace() is a void method call, and thus it cannot be parameterized
    Expression JOptionPane.showMessageDialog(FrameManager.getInstance().getActiveFrame(),GlobalResourceLoader.getString("org.columba.core.i18n.dialog","error","no_browser"),"Error",JOptionPane.ERROR_MESSAGE) is a void method call, and thus it cannot be parameterized
    1
    try
                                                  
    2
    Desktop.browse(url);
    Preondition Violations
    Unmatched statement Desktop.browse(url); 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
    2
    Desktop.browse(url);
    2
    FrameManager.getInstance().openView("ThreePaneMail");
    2
    FrameManager.getInstance().openView("ThreePaneMail");
    Preondition Violations
    Unmatched statement FrameManager.getInstance().openView("ThreePaneMail"); 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 (11)
    Row Violation
    1Expression e.printStackTrace() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    2Expression e.printStackTrace() is a void method call, and thus it cannot be parameterized
    3Expression JOptionPane.showMessageDialog(FrameManager.getInstance().getActiveFrame(),GlobalResourceLoader.getString("org.columba.core.i18n.dialog","error","no_browser"),"Error",JOptionPane.ERROR_MESSAGE) is a void method call, and thus it cannot be parameterized
    4Expression e cannot be parameterized, because it has dependencies to/from statements that will be extracted
    5Type org.columba.api.plugin.PluginLoadingFailedException of variable e does not match with type javax.swing.JOptionPane of variable JOptionPane
    6Expression e.printStackTrace() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    7Expression e.printStackTrace() is a void method call, and thus it cannot be parameterized
    8Expression JOptionPane.showMessageDialog(FrameManager.getInstance().getActiveFrame(),GlobalResourceLoader.getString("org.columba.core.i18n.dialog","error","no_browser"),"Error",JOptionPane.ERROR_MESSAGE) is a void method call, and thus it cannot be parameterized
    9Unmatched statement Desktop.browse(url); 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
    10Unmatched statement FrameManager.getInstance().openView("ThreePaneMail"); 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
    11The refactoring of the clones is infeasible, because classes org.columba.core.gui.globalactions.OpenNewMailWindowAction and org.columba.core.desktop.JDICDesktop do not have a common superclass