if (jtextfieldBckBackupFile.getText().trim().length() == 0) {
bufError.append(i18n.ERROR_FILENAME_BACKUP_MISSING + CR);
if (!focusSet) {
jtextfieldBckBackupFile.requestFocusInWindow();
focusSet = true;
}
}
bufError.append(i18n.ERROR_PORT_MISSING + CR);
if (!focusSet) {
jtextfieldResPort.requestFocusInWindow();
focusSet = true;
}
Clone fragments detected by clone detection tool
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: 5
|
|
Number of AST nodes: 4
|
|
1 | if (jtextfieldBckBackupFile.getText().trim().length() == 0) {↵ | | |
|
2 | bufError.append(i18n.ERROR_FILENAME_BACKUP_MISSING + CR);↵ | | 1 | bufError.append(i18n.ERROR_PORT_MISSING + CR);↵
|
3 | if (!focusSet) {↵ | | 2 | if (!focusSet) {↵
|
4 | jtextfieldBckBackupFile.requestFocusInWindow();↵ | | 3 | jtextfieldResPort.requestFocusInWindow();↵
|
5 | focusSet = true;↵ | | 4 | focusSet = true;↵
|
6 | }↵ | | 5 | }
|
7 | } | | | |
See real code fragment |
|
See real code fragment |
Summary
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 declared in the same class |
Number of node comparisons | 11 |
-
{Refactorable}
Mapping Summary
Number of mapped statements | 4 |
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) | 1.7 |
Clone type | Type 2 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
31 | bufError.append(i18n.ERROR_FILENAME_BACKUP_MISSING + CR); | | 13 | bufError.append(i18n.ERROR_PORT_MISSING + CR); |
32 | if (!focusSet) | | 14 | if (!focusSet) |
33 | jtextfieldBckBackupFile.requestFocusInWindow(); | | 15 | jtextfieldResPort.requestFocusInWindow(); |
34 | | | 16 | |
Precondition Violations (0)
Row |
Violation |