if (jtextfieldFilename.getText().trim().length() == 0) { bufError.append(i18n.CREATEDB_ERROR_FILENAME_MISSING + CR); if (!focusSet) { jtextfieldFilename.requestFocusInWindow(); focusSet = true; } }
if (jtextfieldServer.getText().trim().length() == 0) { bufError.append(i18n.CREATEDB_ERROR_SERVER_MISSING + CR); if (!focusSet) { jtextfieldServer.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: 5 Number of AST nodes: 5
1
if (jtextfieldFilename.getText().trim().length() == 0) {
1
if (jtextfieldServer.getText().trim().length() == 0) {
2
			bufError.append(i18n.CREATEDB_ERROR_FILENAME_MISSING + CR);
2
			bufError.append(i18n.CREATEDB_ERROR_SERVER_MISSING + CR);
3
			if (!focusSet) {
3
			if (!focusSet) {
4
				jtextfieldFilename.requestFocusInWindow();
4
				jtextfieldServer.requestFocusInWindow();
5
				focusSet = true;
5
				focusSet = true;
6
			}
6
			}
7
		}
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 comparisons13
  1. {Refactorable}
    Mapping Summary
    Number of mapped statements5
    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.6
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    12
    if (jtextfieldFilename.getText().trim().length() == 0)
    12
    if (jtextfieldFilename.getText().trim().length() == 0)
    17
    if (jtextfieldServer.getText().trim().length() == 0)
    Differences
    Expression1Expression2Difference
    jtextfieldFilenamejtextfieldServerVARIABLE_NAME_MISMATCH
    17
    if (jtextfieldServer.getText().trim().length() == 0)
    13
    bufError.append(i18n.CREATEDB_ERROR_FILENAME_MISSING + CR);
    13
    bufError.append(i18n.CREATEDB_ERROR_FILENAME_MISSING + CR);
    18
    bufError.append(i18n.CREATEDB_ERROR_SERVER_MISSING + CR);
    Differences
    Expression1Expression2Difference
    CREATEDB_ERROR_FILENAME_MISSINGCREATEDB_ERROR_SERVER_MISSINGVARIABLE_NAME_MISMATCH
    18
    bufError.append(i18n.CREATEDB_ERROR_SERVER_MISSING + CR);
    14
    if (!focusSet)
    19
    if (!focusSet)
    15
    jtextfieldFilename.requestFocusInWindow();
    15
    jtextfieldFilename.requestFocusInWindow();
    20
    jtextfieldServer.requestFocusInWindow();
    Differences
    Expression1Expression2Difference
    jtextfieldFilenamejtextfieldServerVARIABLE_NAME_MISMATCH
    20
    jtextfieldServer.requestFocusInWindow();
    16
    focusSet = true;
    21
    focusSet = true;
    Precondition Violations (0)
    Row Violation