if (isNewColumn() && getNewColumnName().equals(""))
{
setAllButtonEnabled(false);
return;
}
// if the check gets till here we have all the need information
setAllButtonEnabled(true);
if (_columnTab._columTable.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/AddForeignKeyDialog.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 (↵
|
2 | {↵ | | |
|
3 | ↵ | | 2 | _columnTab._columTable.getRowCount() == 0) {↵
|
4 | setAllButtonEnabled(false);↵ | | 3 | setAllButtonEnabled(false);↵
|
5 | return;↵ | | |
|
6 | }↵ | | |
|
7 | ↵ | | 4 | return;↵
|
| | | 5 | }↵
|
|
8 | // 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↵
|
9 | 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.7 |
Clone type | Type 3 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
| | | 1 | if (_columnTab._columTable.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; |