if (AddModifySequenceDialog.this._nameField.getText().equals("")) { enableAllButtons(false); return; } enableAllButtons(true);
if (_columnTab._columTable.getRowCount() == 0 || getConstraintName().equals("")) { setAllButtonEnabled(false); return; } // if the check gets till here we have all the need information setAllButtonEnabled(true);
Clone fragments detected by clone detection tool
File path: /sql12/plugins/refactoring/src/net/sourceforge/squirrel_sql/plugins/refactoring/gui/AddModifySequenceDialog.java File path: /sql12/plugins/refactoring/src/net/sourceforge/squirrel_sql/plugins/refactoring/gui/AddUniqueConstraintDialog.java
Method name: void keyReleased(KeyEvent) Method name: void checkInputCompletion()
Number of AST nodes: 4 Number of AST nodes: 4
1
if (AddModifySequenceDialog.this._nameField.getText().equals(""))
1
if (_columnTab._columTable.getRowCount() == 0 || getConstraintName().equals(""))
2
				{
2
		{
3
					enableAllButtons(false);
3
			setAllButtonEnabled(false);
4
					return;
4
			return;
5
				}
5
		}
6
				enable
6
		// if the check gets till here we have all the need information
7
AllButtons(true);
7
		setAllButtonEnabled(true);
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 comparisons2
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements1
    Number of unmapped statements in the first code fragment3
    Number of unmapped statements in the second code fragment3
    Time elapsed for statement mapping (ms)15.1
    Clone typeType 3
    Mapped Statements
    ID Statement ID Statement
                                                                                                                                                                        
    1
    if (_columnTab._columTable.getRowCount() == 0 || getConstraintName().equals(""))
                                                                
    2
    setAllButtonEnabled(false);
                        
    3
    return;
    Preondition Violations
    Unmatched return;
    3
    return;
    1
    if (AddModifySequenceDialog.this._nameField.getText().equals(""))
                                                                                                                                          
    2
    enableAllButtons(false);
                                                          
    3
    return;
    3
    return;
    Preondition Violations
    Unmatched return;
                        
    4
    enableAllButtons(true);
    4
    enableAllButtons(true);
    4
    setAllButtonEnabled(true);
    Differences
    Expression1Expression2Difference
    enableAllButtonssetAllButtonEnabledMETHOD_INVOCATION_NAME_MISMATCH
    Preondition Violations
    Expression enableAllButtons(true) is a void method call, and thus it cannot be parameterized
    Expression setAllButtonEnabled(true) is a void method call, and thus it cannot be parameterized
    4
    setAllButtonEnabled(true);
    Precondition Violations (5)
    Row Violation
    1Unmatched return;
    2Unmatched return;
    3Expression enableAllButtons(true) is a void method call, and thus it cannot be parameterized
    4Expression setAllButtonEnabled(true) is a void method call, and thus it cannot be parameterized
    5The refactoring of the clones is infeasible, because classes and net.sourceforge.squirrel_sql.plugins.refactoring.gui.AddUniqueConstraintDialog do not have a common superclass