if (_ta != null) { _ta.setWrapStyleWord(!_ta.getWrapStyleWord()); }
if (_handler != null) { _handler.sqlDataUpdated(updateCount); }
Clone fragments detected by clone detection tool
File path: /sql12/fw/src/net/sourceforge/squirrel_sql/fw/datasetviewer/PopupEditableIOPanel.java File path: /sql12/app/src/net/sourceforge/squirrel_sql/client/session/SQLExecuterTask.java
Method name: void actionPerformed(ActionEvent) Method name: boolean processQuery(String, int, int)
Number of AST nodes: 2 Number of AST nodes: 2
1
if (_ta != null)
1
if (_handler != null)
2
			{
3
				_ta.setWrapStyleWord(!_ta.getWrapStyleWord());
4
			
2
            {
3
               _handler.sqlDataUpdated(updateCount);
5
}
4
            }
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.1
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)0.8
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    if (_ta != null)
    1
    if (_ta != null)
    18
    if (_handler != null)
    Differences
    Expression1Expression2Difference
    _ta_handlerVARIABLE_NAME_MISMATCH
    javax.swing.JTextAreanet.sourceforge.squirrel_sql.client.session.ISQLExecuterHandlerVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type javax.swing.JTextArea of variable _ta does not match with type net.sourceforge.squirrel_sql.client.session.ISQLExecuterHandler of variable _handler
    • Make classes javax.swing.JTextArea and net.sourceforge.squirrel_sql.client.session.ISQLExecuterHandler extend a common superclass
    18
    if (_handler != null)
    2
    _ta.setWrapStyleWord(!_ta.getWrapStyleWord());
    2
    _ta.setWrapStyleWord(!_ta.getWrapStyleWord());
    Preondition Violations
    Unmatched statement _ta.setWrapStyleWord(!_ta.getWrapStyleWord()); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
                                                                                                      
                                                                                      
    19
    _handler.sqlDataUpdated(updateCount);
    Preondition Violations
    Unmatched statement _handler.sqlDataUpdated(updateCount); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
    Unmatched statement _handler.sqlDataUpdated(updateCount); 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
    19
    _handler.sqlDataUpdated(updateCount);
    Precondition Violations (5)
    Row Violation
    1Type javax.swing.JTextArea of variable _ta does not match with type net.sourceforge.squirrel_sql.client.session.ISQLExecuterHandler of variable _handler
    2Unmatched statement _ta.setWrapStyleWord(!_ta.getWrapStyleWord()); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
    3Unmatched statement _handler.sqlDataUpdated(updateCount); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
    4Unmatched statement _handler.sqlDataUpdated(updateCount); 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
    5The refactoring of the clones is infeasible, because the number of macthed statements is equal to zero