if (jtextfieldServer.getText().trim().length() == 0) { bufError.append(i18n.CREATEDB_ERROR_SERVER_MISSING + CR); if (!focusSet) { jtextfieldServer.requestFocusInWindow(); focusSet = true; } }
if (jtextfieldBckDBHost.getText().trim().length() == 0) { bufError.append(i18n.ERROR_SERVER_MISSING + CR); if (!focusSet) { jtextfieldBckDBHost.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/FirebirdManagerBackupRestoreFrame.java
Method name: boolean isInputOK() Method name: boolean isBackupInputOK()
Number of AST nodes: 5 Number of AST nodes: 5
1
if (jtextfieldServer.getText().trim().length() == 0) {
1
if (jtextfieldBckDBHost.getText().trim().length() == 0) {
2
			bufError.append(i18n.CREATEDB_ERROR_SERVER_MISSING + CR);
2
			bufError.append(i18n.ERROR_SERVER_MISSING + CR);
3
			if (!focusSet) {
3
			if (!focusSet) {
4
				jtextfieldServer.requestFocusInWindow();
4
				jtextfieldBckDBHost.requestFocusInWindow();
5
				focusSet = true;
5
				focusSet = true;
6
			}
6
			}
7
		}
7
		}
Summary
Number of common nesting structure subtrees1
Number of refactorable cases0
Number of non-refactorable cases1
Time elapsed for finding largest common nesting structure subtrees (ms)0.3
Clones locationClones are in different classes having the same super class
Number of node comparisons13
  1. {Non-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)2.3
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    17
    if (jtextfieldServer.getText().trim().length() == 0)
    17
    if (jtextfieldServer.getText().trim().length() == 0)
    7
    if (jtextfieldBckDBHost.getText().trim().length() == 0)
    Differences
    Expression1Expression2Difference
    jtextfieldServerjtextfieldBckDBHostVARIABLE_NAME_MISMATCH
    7
    if (jtextfieldBckDBHost.getText().trim().length() == 0)
    18
    bufError.append(i18n.CREATEDB_ERROR_SERVER_MISSING + CR);
    18
    bufError.append(i18n.CREATEDB_ERROR_SERVER_MISSING + CR);
    8
    bufError.append(i18n.ERROR_SERVER_MISSING + CR);
    Differences
    Expression1Expression2Difference
    net.sourceforge.squirrel_sql.plugins.firebirdmanager.gui.FirebirdManagerCreateDatabaseFrame.i18nnet.sourceforge.squirrel_sql.plugins.firebirdmanager.gui.FirebirdManagerBackupRestoreFrame.i18nVARIABLE_TYPE_MISMATCH
    CREATEDB_ERROR_SERVER_MISSINGERROR_SERVER_MISSINGVARIABLE_NAME_MISMATCH
    Preondition Violations
    Type net.sourceforge.squirrel_sql.plugins.firebirdmanager.gui.FirebirdManagerCreateDatabaseFrame.i18n does not match with type net.sourceforge.squirrel_sql.plugins.firebirdmanager.gui.FirebirdManagerBackupRestoreFrame.i18n
    • Make classes net.sourceforge.squirrel_sql.plugins.firebirdmanager.gui.FirebirdManagerCreateDatabaseFrame.i18n and net.sourceforge.squirrel_sql.plugins.firebirdmanager.gui.FirebirdManagerBackupRestoreFrame.i18n extend a common superclass
    8
    bufError.append(i18n.ERROR_SERVER_MISSING + CR);
    19
    if (!focusSet)
    9
    if (!focusSet)
    20
    jtextfieldServer.requestFocusInWindow();
    20
    jtextfieldServer.requestFocusInWindow();
    10
    jtextfieldBckDBHost.requestFocusInWindow();
    Differences
    Expression1Expression2Difference
    jtextfieldServerjtextfieldBckDBHostVARIABLE_NAME_MISMATCH
    10
    jtextfieldBckDBHost.requestFocusInWindow();
    21
    focusSet = true;
    11
    focusSet = true;
    Precondition Violations (1)
    Row Violation
    1Type net.sourceforge.squirrel_sql.plugins.firebirdmanager.gui.FirebirdManagerCreateDatabaseFrame.i18n does not match with type net.sourceforge.squirrel_sql.plugins.firebirdmanager.gui.FirebirdManagerBackupRestoreFrame.i18n