final JFrame f = parent; SwingUtilities.invokeLater(new Runnable() { public void run() { JOptionPane.showMessageDialog(f, message, title, messageType); } });
final JTextArea store = _textArea; SwingUtilities.invokeLater(new Runnable() { public void run() { store.append(buf.toString()); } });
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/oracle/src/net/sourceforge/squirrel_sql/plugins/oracle/dboutput/DBOutputPanel.java
Method name: void showMessageDialog(String, String, int) Method name: void populateDBOutput()
Number of AST nodes: 2 Number of AST nodes: 2
1
final JFrame f = parent;
1
final J
2
TextArea store = _textArea;
2
        SwingUtilities.invokeLater(new Runnable() {
3
            SwingUtilities.invokeLater(new Runnable()
4
            {
3
            public void run() {
5
               public void run()
4
                JOptionPane.showMessageDialog(f, 
6
               
5
                        message, 
6
                        title, 
7
                        messageType);
8
            }
7
{
8
                  store.append(buf.toString());
9
               }
9
        });
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.0
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 fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)0.0
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    final JFrame f = parent;
    1
    final JFrame f = parent;
    17
    final JTextArea store = _textArea;
    Differences
    Expression1Expression2Difference
    javax.swing.JFramejavax.swing.JTextAreaSUBCLASS_TYPE_MISMATCH
    fstoreVARIABLE_NAME_MISMATCH
    javax.swing.JFramejavax.swing.JTextAreaSUBCLASS_TYPE_MISMATCH
    parent_textAreaVARIABLE_NAME_MISMATCH
    javax.swing.JFramejavax.swing.JTextAreaSUBCLASS_TYPE_MISMATCH
    17
    final JTextArea store = _textArea;
    2
    SwingUtilities.invokeLater(new Runnable() {...});
    2
    SwingUtilities.invokeLater(new Runnable() {...});
    18
    SwingUtilities.invokeLater(new Runnable() {...});
    Differences
    Expression1Expression2Difference
    showMessageDialogappendMETHOD_INVOCATION_NAME_MISMATCH
    JOptionPane.showMessageDialog(f,message,title,messageType)store.append(buf.toString())TYPE_COMPATIBLE_REPLACEMENT
    JOptionPane.showMessageDialog(f,message,title,messageType)store.append(buf.toString())ARGUMENT_NUMBER_MISMATCH
    Preondition Violations
    Expression JOptionPane.showMessageDialog(f,message,title,messageType) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression store.append(buf.toString()) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression JOptionPane.showMessageDialog(f,message,title,messageType) is a void method call, and thus it cannot be parameterized
    Expression store.append(buf.toString()) is a void method call, and thus it cannot be parameterized
    Expression JOptionPane.showMessageDialog(f,message,title,messageType) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression store.append(buf.toString()) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression JOptionPane.showMessageDialog(f,message,title,messageType) is a void method call, and thus it cannot be parameterized
    Expression store.append(buf.toString()) is a void method call, and thus it cannot be parameterized
    18
    SwingUtilities.invokeLater(new Runnable() {...});
    Precondition Violations (9)
    Row Violation
    1Expression JOptionPane.showMessageDialog(f,message,title,messageType) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    2Expression store.append(buf.toString()) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    3Expression JOptionPane.showMessageDialog(f,message,title,messageType) is a void method call, and thus it cannot be parameterized
    4Expression store.append(buf.toString()) is a void method call, and thus it cannot be parameterized
    5Expression JOptionPane.showMessageDialog(f,message,title,messageType) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    6Expression store.append(buf.toString()) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    7Expression JOptionPane.showMessageDialog(f,message,title,messageType) is a void method call, and thus it cannot be parameterized
    8Expression store.append(buf.toString()) is a void method call, and thus it cannot be parameterized
    9The refactoring of the clones is infeasible, because classes net.sourceforge.squirrel_sql.plugins.dbcopy.CopyProgressMonitor and net.sourceforge.squirrel_sql.plugins.oracle.dboutput.DBOutputPanel do not have a common superclass