try { FrameManager.getInstance().openView("ThreePaneMail"); } catch (PluginLoadingFailedException e) { e.printStackTrace(); }
if (child instanceof AddressbookFolder) { try { ((AddressbookFolder) child).save(); } catch (Exception ex) { ex.printStackTrace(); } }
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/contact/src/main/java/org/columba/addressbook/shutdown/SaveAllAddressbooksPlugin.java
Method name: void actionPerformed(ActionEvent) Method name: void saveFolders(AddressbookTreeNode)
Number of AST nodes: 2 Number of AST nodes: 3
1
try {
2
			FrameManager.getInstance().openView("ThreePaneMail");
3
		} catch (PluginLoadingFailed
1
if (child instanceof AddressbookFolder) {
2
                try {
3
                    ((AddressbookFolder) child).save();
4
Exception e) {
4
                } catch (Exception ex) {
5
			e.printStackTrace();
6
		
5
                    ex.printStackTrace();
6
                }
7
}
7
            }
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 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)1.1
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    try
    1
    try
    4
    try
    Differences
    Expression1Expression2Difference
    org.columba.api.plugin.PluginLoadingFailedExceptionjava.lang.ExceptionSUBCLASS_TYPE_MISMATCH
    eexVARIABLE_NAME_MISMATCH
    org.columba.api.plugin.PluginLoadingFailedExceptionjava.lang.ExceptionSUBCLASS_TYPE_MISMATCH
    eexVARIABLE_NAME_MISMATCH
    org.columba.api.plugin.PluginLoadingFailedExceptionjava.lang.ExceptionSUBCLASS_TYPE_MISMATCH
    4
    try
    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
                                                                                                                    
                                                                              
    5
    ((AddressbookFolder)child).save();
    Preondition Violations
    Unmatched statement ((AddressbookFolder)child).save(); 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
    5
    ((AddressbookFolder)child).save();
    Precondition Violations (3)
    Row Violation
    1Unmatched 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
    2Unmatched statement ((AddressbookFolder)child).save(); 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
    3The refactoring of the clones is infeasible, because classes org.columba.core.gui.globalactions.OpenNewMailWindowAction and org.columba.addressbook.shutdown.SaveAllAddressbooksPlugin do not have a common superclass