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.supportsColumnComment()) {↵ | 1 | if (!dialect.supportsAlterColumnNull()) {↵ | |
2 | commentTextArea.setEditable(false);↵ | 2 | nullableCheckBox.setEnabled(false);↵ | |
3 | //i18n[ColumnDetailsDialog.columnCommentLabel={0} does not ↵ | 3 | //i18n[ColumnDetailsDialog.columnNullLabel={0} does not ↵ | |
4 | //support column comments]↵ | 4 | //support ↵ | |
5 | altering column nullability]↵ | |||
5 | String noColumnSupportMsg =↵ | 6 | String noColumnSupportMsg = ↵ | |
6 | s_stringMgr.getString(↵ | 7 | s_stringMgr.getString(↵ | |
7 | "ColumnDetailsDialog.columnCommentToolTip",↵ | 8 | "ColumnDetailsDialog.columnNullToolTip",↵ | |
8 | dbName);↵ | 9 | dbName);↵ | |
9 | commentTextArea.setToolTipText(noColumnSupportMsg);↵ | 10 | nullableCheckBox.setToolTipText(noColumnSupportMsg);↵ | |
10 | } else {↵ | 11 | } else {↵ | |
11 | commentTextArea.setEditable(true);↵ | 12 | nullableCheckBox.setEnabled(true);↵ | |
12 | commentTextArea.setToolTipText(null);↵ | 13 | nullableCheckBox.setToolTipText(null);↵ | |
13 | } | 14 | } | |
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 | 36 |
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) | 14.8 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
3 | if (!dialect.supportsColumnComment()) |
| 10 | if (!dialect.supportsAlterColumnNull()) | ||||||||||||||||||
4 | commentTextArea.setEditable(false); |
| 11 | nullableCheckBox.setEnabled(false); | ||||||||||||||||||
5 | String noColumnSupportMsg = s_stringMgr.getString("ColumnDetailsDialog.columnCommentToolTip", dbName); |
| 12 | String noColumnSupportMsg = s_stringMgr.getString("ColumnDetailsDialog.columnNullToolTip", dbName); | ||||||||||||||||||
6 | commentTextArea.setToolTipText(noColumnSupportMsg); |
| 13 | nullableCheckBox.setToolTipText(noColumnSupportMsg); | ||||||||||||||||||
else | else | |||||||||||||||||||||
7 | commentTextArea.setEditable(true); |
| 14 | nullableCheckBox.setEnabled(true); | ||||||||||||||||||
8 | commentTextArea.setToolTipText(null); |
| 15 | nullableCheckBox.setToolTipText(null); |
Row | Violation |
---|---|
1 | Expression commentTextArea.setEditable(false) is a void method call, and thus it cannot be parameterized |
2 | Expression nullableCheckBox.setEnabled(false) is a void method call, and thus it cannot be parameterized |
3 | Expression commentTextArea.setEditable(true) is a void method call, and thus it cannot be parameterized |
4 | Expression nullableCheckBox.setEnabled(true) is a void method call, and thus it cannot be parameterized |