String exMsg = ""; if (e.getException() != null) { exMsg = e.getException().getMessage(); } String message = getMessage("CopyProgressMonitor.setupAutoCommitException", exMsg); String title = getMessage("CopyProgressMonitor.setupAutoCommitExceptionTitle"); int messageType = JOptionPane.ERROR_MESSAGE; showMessageDialog(message, title, messageType);
String exMsg = ""; if (e.getException() != null) { exMsg = e.getException().getMessage(); } String message = getMessage("CopyProgressMonitor.restoreAutoCommitException", exMsg); String title = getMessage("CopyProgressMonitor.restoreAutoCommitExceptionTitle"); int messageType = JOptionPane.ERROR_MESSAGE; showMessageDialog(message, title, messageType);
Clone fragments detected by clone detection tool
File path: /sql12/plugins/dbcopy/src/net/sourceforge/squirrel_sql/plugins/dbcopy/CopyProgressMonitor.java File path: /sql12/plugins/dbcopy/src/net/sourceforge/squirrel_sql/plugins/dbcopy/CopyProgressMonitor.java
Method name: void handleError(ErrorEvent) Method name: void handleError(ErrorEvent)
Number of AST nodes: 7 Number of AST nodes: 7
1
String exMsg = "";
1
String exMsg = "";
2
            if (e.getException() != null) {
2
            if (e.getException() != null) {
3
                exMsg = e.getException().getMessage();
3
                exMsg = e.getException().getMessage();
4
            }            
4
            }
5
            String message = 
5
            String message = 
6
                getMessage("CopyProgressMonitor.setupAutoCommitException",
6
                getMessage("CopyProgressMonitor.restoreAutoCommitException", 
7
                           exMsg);
7
                           exMsg);
8
            String title = 
8
            String title =
9
                getMessage("CopyProgressMonitor.setupAutoCommitExceptionTitle");
9
                getMessage("CopyProgressMonitor.restoreAutoCommitExceptionTitle");
10
            int messageType = JOptionPane.ERROR_MESSAGE;
10
            int messageType = JOptionPane.ERROR_MESSAGE;
11
            showMessageDialog(message, title, messageType);
11
            showMessageDialog(message, title, messageType);
Summary
Number of common nesting structure subtrees1
Number of refactorable cases1
Number of non-refactorable cases0
Time elapsed for finding largest common nesting structure subtrees (ms)0.3
Clones locationClones are in the same method
Number of node comparisons30
  1. {Refactorable}
    Mapping Summary
    Number of mapped statements7
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)4.8
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    4
    String exMsg = "";
    12
    String exMsg = "";
    5
    if (e.getException() != null)
    13
    if (e.getException() != null)
    6
    exMsg = e.getException().getMessage();
    14
    exMsg = e.getException().getMessage();
    7
    String message = getMessage("CopyProgressMonitor.setupAutoCommitException", exMsg);
    7
    String message = getMessage("CopyProgressMonitor.setupAutoCommitException", exMsg);
    15
    String message = getMessage("CopyProgressMonitor.restoreAutoCommitException", exMsg);
    Differences
    Expression1Expression2Difference
    "CopyProgressMonitor.setupAutoCommitException""CopyProgressMonitor.restoreAutoCommitException"LITERAL_VALUE_MISMATCH
    15
    String message = getMessage("CopyProgressMonitor.restoreAutoCommitException", exMsg);
    8
    String title = getMessage("CopyProgressMonitor.setupAutoCommitExceptionTitle");
    8
    String title = getMessage("CopyProgressMonitor.setupAutoCommitExceptionTitle");
    16
    String title = getMessage("CopyProgressMonitor.restoreAutoCommitExceptionTitle");
    Differences
    Expression1Expression2Difference
    "CopyProgressMonitor.setupAutoCommitExceptionTitle""CopyProgressMonitor.restoreAutoCommitExceptionTitle"LITERAL_VALUE_MISMATCH
    16
    String title = getMessage("CopyProgressMonitor.restoreAutoCommitExceptionTitle");
    9
    int messageType = JOptionPane.ERROR_MESSAGE;
    17
    int messageType = JOptionPane.ERROR_MESSAGE;
    10
    showMessageDialog(message, title, messageType);
    18
    showMessageDialog(message, title, messageType);
    Precondition Violations (0)
    Row Violation