SetAutoCommitTask task = new SetAutoCommitTask(); if (SwingUtilities.isEventDispatchThread()) { _session.getApplication().getThreadPool().addTask(task); } else { task.run(); }
SetAutoCommitTask task = new SetAutoCommitTask(); if (SwingUtilities.isEventDispatchThread()) { _session.getApplication().getThreadPool().addTask(task); } else { task.run(); }
Clone fragments detected by clone detection tool
File path: /sql12/app/src/net/sourceforge/squirrel_sql/client/session/mainpanel/SQLPanel.java File path: /sql12/app/src/net/sourceforge/squirrel_sql/client/session/mainpanel/SQLResultExecuterPanel.java
Method name: void propertiesHaveChanged(String) Method name: void propertiesHaveChanged(String)
Number of AST nodes: 4 Number of AST nodes: 4
1
SetAutoCommitTask task = new SetAutoCommitTask();
1
SetAutoCommitTask task = new SetAutoCommitTask();
2
            if (SwingUtilities.isEventDispatchThread()) {
2
		    if (SwingUtilities.isEventDispatchThread()) {
3
                _session.getApplication().getThreadPool().addTask(task);
3
                _session.getApplication().getThreadPool().addTask(task);
4
            } else {
4
            } else {
5
                task.run();
5
                task.run();
6
            }
6
            }
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.7
Clones locationClones are in different classes having the same super class
Number of node comparisons11
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements3
    Number of unmapped statements in the first code fragment1
    Number of unmapped statements in the second code fragment1
    Time elapsed for statement mapping (ms)2.1
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
                                                                                                        
    3
    SetAutoCommitTask task = new SetAutoCommitTask();
    5
    SetAutoCommitTask task = new SetAutoCommitTask();
                                                                                                        
    6
    if (SwingUtilities.isEventDispatchThread())
    4
    if (SwingUtilities.isEventDispatchThread())
    7
    _session.getApplication().getThreadPool().addTask(task);
    7
    _session.getApplication().getThreadPool().addTask(task);
    5
    _session.getApplication().getThreadPool().addTask(task);
    Differences
    Expression1Expression2Difference
    net.sourceforge.squirrel_sql.client.session.mainpanel.SQLPanel.SetAutoCommitTasknet.sourceforge.squirrel_sql.client.session.mainpanel.SQLResultExecuterPanel.SetAutoCommitTaskVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type net.sourceforge.squirrel_sql.client.session.mainpanel.SQLPanel.SetAutoCommitTask of variable task does not match with type net.sourceforge.squirrel_sql.client.session.mainpanel.SQLResultExecuterPanel.SetAutoCommitTask of variable task
    • Make classes net.sourceforge.squirrel_sql.client.session.mainpanel.SQLPanel.SetAutoCommitTask and net.sourceforge.squirrel_sql.client.session.mainpanel.SQLResultExecuterPanel.SetAutoCommitTask extend a common superclass
    5
    _session.getApplication().getThreadPool().addTask(task);
    else
    else
    8
    task.run();
    8
    task.run();
    6
    task.run();
    Differences
    Expression1Expression2Difference
    net.sourceforge.squirrel_sql.client.session.mainpanel.SQLPanel.SetAutoCommitTasknet.sourceforge.squirrel_sql.client.session.mainpanel.SQLResultExecuterPanel.SetAutoCommitTaskVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type net.sourceforge.squirrel_sql.client.session.mainpanel.SQLPanel.SetAutoCommitTask of variable task does not match with type net.sourceforge.squirrel_sql.client.session.mainpanel.SQLResultExecuterPanel.SetAutoCommitTask of variable task
    • Make classes net.sourceforge.squirrel_sql.client.session.mainpanel.SQLPanel.SetAutoCommitTask and net.sourceforge.squirrel_sql.client.session.mainpanel.SQLResultExecuterPanel.SetAutoCommitTask extend a common superclass
    6
    task.run();
    Precondition Violations (2)
    Row Violation
    1Type net.sourceforge.squirrel_sql.client.session.mainpanel.SQLPanel.SetAutoCommitTask of variable task does not match with type net.sourceforge.squirrel_sql.client.session.mainpanel.SQLResultExecuterPanel.SetAutoCommitTask of variable task
    2Type net.sourceforge.squirrel_sql.client.session.mainpanel.SQLPanel.SetAutoCommitTask of variable task does not match with type net.sourceforge.squirrel_sql.client.session.mainpanel.SQLResultExecuterPanel.SetAutoCommitTask of variable task