File path: /sql12/app/src/net/sourceforge/squirrel_sql/client/gui/db/ColumnDetailDialog.java | File path: /sql12/app/src/net/sourceforge/squirrel_sql/client/gui/db/ColumnDetailDialog.java | |||
Method name: void itemStateChanged(ItemEvent)
|
Method name: void itemStateChanged(ItemEvent)
|
|||
Number of AST nodes: 6 | Number of AST nodes: 6 | |||
1 | if (!dialect.supportsAlterColumnNull()) {↵ | 1 | if (!dialect.supportsRenameColumn()) {↵ | |
2 | nullableCheckBox.setEnabled(false);↵ | |||
3 | //i18n[ColumnDetailsDialog.columnNullLabel={0} does not ↵ | 2 | //i18n[ColumnDetailsDialog.columnNameTootTip={0} does not ↵ | |
4 | //support altering column nullability]↵ | 3 | //support altering column name]↵ | |
5 | String noColumnSupportMsg = ↵ | 4 | String noColNameChange = ↵ | |
6 | s_stringMgr.getString("ColumnDetailsDialog.columnNullToolTip",↵ | 5 | s_stringMgr.getString("ColumnDetailsDialog.columnNameTootTip", ↵ | |
7 | dbName);↵ | 6 | dbName);↵ | |
8 | nullableCheckBox↵ | 7 | columnNameTextField.setEditable(false);↵ | |
9 | .setToolTipText(noColumnSupportMsg);↵ | 8 | columnNameTextField.setToolTipText(noColNameChange);↵ | |
10 | } else {↵ | 9 | } else {↵ | |
11 | nullableCheckBox.setEnabled(true);↵ | 10 | columnNameTextField.setEditable(true);↵ | |
12 | nullableCheckBox.setToolTipText(null);↵ | 11 | columnNameTextField.setToolTipText(null); ↵ | |
13 | } | 12 |
| |
See real code fragment | See real code fragment |
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 1 |
Number of non-refactorable cases | 0 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.2 |
Clones location | Clones are in the same method |
Number of node comparisons | 37 |
Number of mapped statements | 6 |
Number of unmapped statements in the first code fragment | 0 |
Number of unmapped statements in the second code fragment | 0 |
Time elapsed for statement mapping (ms) | 15.3 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
10 | if (!dialect.supportsAlterColumnNull()) |
| 16 | if (!dialect.supportsRenameColumn()) | ||||||||||||||||||
11 | nullableCheckBox.setEnabled(false); |
| 18 | columnNameTextField.setEditable(false); | ||||||||||||||||||
12 | String noColumnSupportMsg = s_stringMgr.getString("ColumnDetailsDialog.columnNullToolTip", dbName); |
| 17 | String noColNameChange = s_stringMgr.getString("ColumnDetailsDialog.columnNameTootTip", dbName); | ||||||||||||||||||
13 | nullableCheckBox.setToolTipText(noColumnSupportMsg); |
| 19 | columnNameTextField.setToolTipText(noColNameChange); | ||||||||||||||||||
else | else | |||||||||||||||||||||
14 | nullableCheckBox.setEnabled(true); |
| 20 | columnNameTextField.setEditable(true); | ||||||||||||||||||
15 | nullableCheckBox.setToolTipText(null); |
| 21 | columnNameTextField.setToolTipText(null); |
Row | Violation |
---|---|
1 | Expression nullableCheckBox.setEnabled(false) is a void method call, and thus it cannot be parameterized |
2 | Expression columnNameTextField.setEditable(false) is a void method call, and thus it cannot be parameterized |
3 | Expression nullableCheckBox.setEnabled(true) is a void method call, and thus it cannot be parameterized |
4 | Expression columnNameTextField.setEditable(true) is a void method call, and thus it cannot be parameterized |