if (jtextfieldUsername.getText().trim().length() == 0) {
bufError.append(i18n.ERROR_USERNAME_MISSING + CR);
jtextfieldUsername.requestFocusInWindow();
focusSet = true;
}
if (jtextfieldUsername.getText().trim().length() == 0) {
bufError.append(i18n.ERROR_USERNAME_MISSING + CR);
jtextfieldUsername.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 isRestoreInputOK()
|
|
Method name: boolean isBackupInputOK()
|
Number of AST nodes: 4
|
|
Number of AST nodes: 4
|
|
1 | if (jtextfieldUsername.getText().trim().length() == 0) {↵ | | 1 | if (jtextfieldUsername.getText().trim().length() == 0) {↵
|
2 | bufError.append(i18n.ERROR_USERNAME_MISSING + CR);↵ | | 2 | bufError.append(i18n.ERROR_USERNAME_MISSING + CR);↵
|
3 | jtextfieldUsername.requestFocusInWindow();↵ | | 3 | jtextfieldUsername.requestFocusInWindow();↵
|
4 | focusSet = true;↵ | | 4 | focusSet = true;↵
|
5 | } | | 5 | }
|
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 | 16 |
-
{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.9 |
Clone type | Type 1 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
3 | if (jtextfieldUsername.getText().trim().length() == 0) | | 3 | if (jtextfieldUsername.getText().trim().length() == 0) |
4 | bufError.append(i18n.ERROR_USERNAME_MISSING + CR); | | 4 | bufError.append(i18n.ERROR_USERNAME_MISSING + CR); |
5 | jtextfieldUsername.requestFocusInWindow(); | | 5 | jtextfieldUsername.requestFocusInWindow(); |
6 | | | 6 | |
Precondition Violations (0)
Row |
Violation |