if (isNewColumn() && getNewColumnName().equals(""))
{
setAllButtonEnabled(false);
return;
}
// if the check gets till here we have all the need information
setAllButtonEnabled(true);
if (_columnTab._columnTable.getRowCount() == 0)
{
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/MergeColumnDialog.java
|
|
File path: /sql12/plugins/refactoring/src/net/sourceforge/squirrel_sql/plugins/refactoring/gui/AddIndexDialog.java
|
Method name: void checkInputCompletion()
|
|
Method name: void checkInputCompletion()
|
Number of AST nodes: 4
|
|
Number of AST nodes: 4
|
|
1 | if (isNewColumn() && getNewColumnName().equals(""))
↵ | | 1 | if (_columnTab._columnTable.getRowCount() == 0)↵
|
2 | {
↵ | | 2 | {↵
|
3 | setAllButtonEnabled(false);
↵ | | 3 | setAllButtonEnabled(false);↵
|
4 | return;
↵ | | 4 | return;↵
|
5 | }
↵ | | 5 | }↵
|
|
6 | // if the check gets till here we have all the need information
↵ | | 6 | // if the check gets till here we have all the need information↵
|
7 | setAllButtonEnabled(true); | | 7 | setAllButtonEnabled(true);
|
See real code fragment |
|
See real code fragment |
Summary
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 0 |
Number of non-refactorable cases | 1 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.2 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 2 |
-
{Non-refactorable}
Mapping Summary
Number of mapped statements | 1 |
Number of unmapped statements in the first code fragment | 3 |
Number of unmapped statements in the second code fragment | 3 |
Time elapsed for statement mapping (ms) | 7.6 |
Clone type | Type 3 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
| | | 1 | if (_columnTab._columnTable.getRowCount() == 0) |
| | | 2 | setAllButtonEnabled(false); |
| | | 3 | |
1 | if (isNewColumn() && getNewColumnName().equals("")) | | | |
2 | setAllButtonEnabled(false); | | | |
3 | | | | |
4 | setAllButtonEnabled(true); | | 4 | setAllButtonEnabled(true); |
Precondition Violations (2)
Row |
Violation |
1 | Unmatched return; |
2 | Unmatched return; |