bufError.append(i18n.CREATEDB_ERROR_PORT_MISSING + CR); if (!focusSet) { jtextfieldPort.requestFocusInWindow(); focusSet = true; }
if (new String(jpasswordField1.getPassword()).length() > 31) { bufError.append(i18n.ERROR_PASSWORD_MAXLENGTH + CR); if (!focusSet) { jpasswordField1.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/FirebirdManagerUserManagerFrame.java
Method name: boolean isInputOK() Method name: boolean isInputOK()
Number of AST nodes: 4 Number of AST nodes: 5
1
if (new String(jpasswordField1.getPassword()).length() > 31) {
1
bufError.append(i18n.CREATEDB_ERROR_PORT_MISSING + CR);
2
						bufError.append(i18n.ERROR_PASSWORD_MAXLENGTH + CR);
2
			if (!focusSet) {
3
						if (!focusSet) {
3
				jtextfieldPort.requestFocusInWindow();
4
							jpasswordField1.requestFocusInWindow();
4
				focusSet = true;
5
							focusSet = true;
5
			
6
						}
6
}
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 comparisons11
  1. {Non-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)2.3
    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);
    36
    bufError.append(i18n.ERROR_PASSWORD_MAXLENGTH + CR);
    Differences
    Expression1Expression2Difference
    net.sourceforge.squirrel_sql.plugins.firebirdmanager.gui.FirebirdManagerCreateDatabaseFrame.i18nnet.sourceforge.squirrel_sql.plugins.firebirdmanager.gui.FirebirdManagerUserManagerFrame.i18nVARIABLE_TYPE_MISMATCH
    CREATEDB_ERROR_PORT_MISSINGERROR_PASSWORD_MAXLENGTHVARIABLE_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.FirebirdManagerUserManagerFrame.i18n
    • Make classes net.sourceforge.squirrel_sql.plugins.firebirdmanager.gui.FirebirdManagerCreateDatabaseFrame.i18n and net.sourceforge.squirrel_sql.plugins.firebirdmanager.gui.FirebirdManagerUserManagerFrame.i18n extend a common superclass
    36
    bufError.append(i18n.ERROR_PASSWORD_MAXLENGTH + CR);
    24
    if (!focusSet)
    37
    if (!focusSet)
    25
    jtextfieldPort.requestFocusInWindow();
    25
    jtextfieldPort.requestFocusInWindow();
    38
    jpasswordField1.requestFocusInWindow();
    Differences
    Expression1Expression2Difference
    jtextfieldPortjpasswordField1VARIABLE_NAME_MISMATCH
    javax.swing.JTextFieldjavax.swing.JPasswordFieldSUBCLASS_TYPE_MISMATCH
    38
    jpasswordField1.requestFocusInWindow();
    26
    focusSet = true;
    39
    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.FirebirdManagerUserManagerFrame.i18n