bufError.append(i18n.CREATEDB_ERROR_PORT_MISSING + CR); if (!focusSet) { jtextfieldPort.requestFocusInWindow(); focusSet = true; }
if (jtextfieldUsername.getText().trim().length() == 0) { bufError.append(i18n.CREATEDB_ERROR_USERNAME_MISSING + CR); if (!focusSet) { jtextfieldUsername.requestFocusInWindow(); focusSet = true; } }
Clone fragments detected by clone detection tool
File path: /sql12/plugins/firebirdmanager/src/net/sourceforge/squirrel_sql/plugins/firebirdmanager/gui/FirebirdManagerCreateDatabaseFrame.java File path: /sql12/plugins/firebirdmanager/src/net/sourceforge/squirrel_sql/plugins/firebirdmanager/gui/FirebirdManagerCreateDatabaseFrame.java
Method name: boolean isInputOK() Method name: boolean isInputOK()
Number of AST nodes: 4 Number of AST nodes: 5
1
if (jtextfieldUsername.getText().trim().length() == 0) {
1
bufError.append(i18n.CREATEDB_ERROR_PORT_MISSING + CR);
2
			bufError.append(i18n.CREATEDB_ERROR_USERNAME_MISSING + CR);
2
			if (!focusSet) {
3
			if (!focusSet) {
3
				jtextfieldPort.requestFocusInWindow();
4
				jtextfieldUsername.requestFocusInWindow();
4
				focusSet = true;
5
				focusSet = true;
5
			}
6
			}
7
		}
Summary
Number of common nesting structure subtrees1
Number of refactorable cases1
Number of non-refactorable cases0
Time elapsed for finding largest common nesting structure subtrees (ms)0.2
Clones locationClones are in the same method
Number of node comparisons11
  1. {Refactorable}
    Mapping Summary
    Number of mapped statements4
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)1.5
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    23
    bufError.append(i18n.CREATEDB_ERROR_PORT_MISSING + CR);
    23
    bufError.append(i18n.CREATEDB_ERROR_PORT_MISSING + CR);
    30
    bufError.append(i18n.CREATEDB_ERROR_USERNAME_MISSING + CR);
    Differences
    Expression1Expression2Difference
    CREATEDB_ERROR_PORT_MISSINGCREATEDB_ERROR_USERNAME_MISSINGVARIABLE_NAME_MISMATCH
    30
    bufError.append(i18n.CREATEDB_ERROR_USERNAME_MISSING + CR);
    24
    if (!focusSet)
    31
    if (!focusSet)
    25
    jtextfieldPort.requestFocusInWindow();
    25
    jtextfieldPort.requestFocusInWindow();
    32
    jtextfieldUsername.requestFocusInWindow();
    Differences
    Expression1Expression2Difference
    jtextfieldPortjtextfieldUsernameVARIABLE_NAME_MISMATCH
    32
    jtextfieldUsername.requestFocusInWindow();
    26
    focusSet = true;
    33
    focusSet = true;
    Precondition Violations (0)
    Row Violation