File path: /sql12/plugins/firebirdmanager/src/net/sourceforge/squirrel_sql/plugins/firebirdmanager/gui/FirebirdManagerBackupRestoreFrame.java | File path: /sql12/plugins/firebirdmanager/src/net/sourceforge/squirrel_sql/plugins/firebirdmanager/gui/FirebirdManagerBackupRestoreFrame.java | |||
Method name: boolean isBackupInputOK()
|
Method name: boolean isRestoreInputOK()
|
|||
Number of AST nodes: 11 | Number of AST nodes: 11 | |||
1 | if (jtextfieldBckDBFile.getText().trim().length() == 0) {↵ | 1 | if (jtextfieldResBackupFile.getText().trim().length() == 0) {↵ | |
2 | bufError.append(i18n.ERROR_FILENAME_DATABASE_MISSING + CR);↵ | 2 | bufError.append(i18n.ERROR_FILENAME_BACKUP_MISSING + CR);↵ | |
3 | if (!focusSet) {↵ | 3 | if (!focusSet) {↵ | |
4 | jtextfieldBckDBFile.requestFocusInWindow();↵ | 4 | jtextfieldResBackupFile.requestFocusInWindow();↵ | |
5 | focusSet = true;↵ | 5 | focusSet = true;↵ | |
6 | }↵ | 6 | }↵ | |
7 | } else if (jtextfieldBckDBHost.getText().trim().equalsIgnoreCase("localhost")) {↵ | 7 | } else if (jtextfieldResDBHost.getText().trim().equalsIgnoreCase("localhost")) {↵ | |
8 | if (!FirebirdManagerHelper.fileExists(jtextfieldBckDBFile.getText())) {↵ | 8 | if (!FirebirdManagerHelper.fileExists(jtextfieldResBackupFile.getText())) {↵ | |
9 | bufError.append(i18n.ERROR_FILENAME_NOT_EXISTS + " " ↵ | 9 | bufError.append(i18n.ERROR_FILENAME_NOT_EXISTS + " " ↵ | |
10 | + jtextfieldBckDBFile.getText() + " " + CR);↵ | 10 | + jtextfieldResBackupFile.getText() + " " + CR);↵ | |
11 | if (!focusSet) {↵ | 11 | if (!focusSet) {↵ | |
12 | jtextfieldBckDBFile.requestFocusInWindow();↵ | 12 | jtextfieldResBackupFile.requestFocusInWindow();↵ | |
13 | focusSet = true;↵ | 13 | focusSet = true;↵ | |
14 | }↵ | 14 | }↵ | |
15 | }↵ | 15 | }↵ | |
16 | } | 16 |
| |
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.7 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 30 |
Number of mapped statements | 11 |
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) | 3.4 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
19 | if (jtextfieldBckDBFile.getText().trim().length() == 0) |
| 19 | if (jtextfieldResBackupFile.getText().trim().length() == 0) | ||||||||||
20 | bufError.append(i18n.ERROR_FILENAME_DATABASE_MISSING + CR); |
| 20 | bufError.append(i18n.ERROR_FILENAME_BACKUP_MISSING + CR); | ||||||||||
21 | if (!focusSet) | 21 | if (!focusSet) | |||||||||||
22 | jtextfieldBckDBFile.requestFocusInWindow(); |
| 22 | jtextfieldResBackupFile.requestFocusInWindow(); | ||||||||||
23 | focusSet = true; | 23 | focusSet = true; | |||||||||||
24 | else if (jtextfieldBckDBHost.getText().trim().equalsIgnoreCase("localhost")) |
| 24 | else if (jtextfieldResDBHost.getText().trim().equalsIgnoreCase("localhost")) | ||||||||||
25 | if (!FirebirdManagerHelper.fileExists(jtextfieldBckDBFile.getText())) |
| 25 | if (!FirebirdManagerHelper.fileExists(jtextfieldResBackupFile.getText())) | ||||||||||
26 | bufError.append(i18n.ERROR_FILENAME_NOT_EXISTS + " " + jtextfieldBckDBFile.getText() + " " + CR); |
| 26 | bufError.append(i18n.ERROR_FILENAME_NOT_EXISTS + " " + jtextfieldResBackupFile.getText() + " " + CR); | ||||||||||
27 | if (!focusSet) | 27 | if (!focusSet) | |||||||||||
28 | jtextfieldBckDBFile.requestFocusInWindow(); |
| 28 | jtextfieldResBackupFile.requestFocusInWindow(); | ||||||||||
29 | focusSet = true; | 29 | focusSet = true; |
Row | Violation |
---|