Buggy code:
private boolean generatedKey = false ; private Button bOpen = null ; private Button bCreateKey = null ; private Button bEchoKeyStorePassword = null ; private Button bEchoKeyPassword = null ; private Combo cAlgorithm = null ; private Label lPreview = null ; private Label lResult = null ; private Text tCommonName = null ; private Text tOrganizationalUnit = null ; private Text tOrganization = null ; private Text tLocation = null ; private Text tState = null ; private Text tCountry = null ; private Text tKeyName = null ; private Text tKeystore = null ; private Text tKeystorePassword = null ; private Text tKeyPassword = null ; private static final int LABELWIDTH = 160 ; private static final int TEXTHEIGHT = 40 ; private Signature signature = null ; private Keystore keystore = null ; public PageCreateKey ( final Signature signature , final String project ) { } public void createControl ( final Composite parent ) { } private void createPageContent ( final Composite parent ) { } private void addListeners ( ) { } private void dialogChanged ( ) { if ( ( tCommonName . getText ( ) . length ( ) ) > 0 ) { lPreview . setText ( ( "CN=" + ( tCommonName . getText ( ) ) ) ) ; } else { lPreview . setText ( "" ) ; updateStatus ( enterCommonName ) ; return ; } if ( ( tOrganizationalUnit . getText ( ) . length ( ) ) > 0 ) { lPreview . setText ( ( ( ( "CN=" + ( tCommonName . getText ( ) ) ) + ",<seq2seq4repair_space>OU=" ) + ( tOrganizationalUnit . getText ( ) ) ) ) ; } if ( ( tOrganization . getText ( ) . length ( ) ) > 0 ) { lPreview . setText ( ( ( ( ( ( "CN=" + ( tCommonName . getText ( ) ) ) + ",<seq2seq4repair_space>OU=" ) + ( tOrganizationalUnit . getText ( ) ) ) + ",<seq2seq4repair_space>O=" ) + ( tOrganization . getText ( ) ) ) ) ; } if ( ( tLocation . getText ( ) . length ( ) ) > 0 ) { lPreview . setText ( ( ( ( ( ( ( ( "CN=" + ( tCommonName . getText ( ) ) ) + ",<seq2seq4repair_space>OU=" ) + ( tOrganizationalUnit . getText ( ) ) ) + ",<seq2seq4repair_space>O=" ) + ( tOrganization . getText ( ) ) ) + ",<seq2seq4repair_space>L=" ) + ( tLocation . getText ( ) ) ) ) ; } if ( ( tState . getText ( ) . length ( ) ) > 0 ) { lPreview . setText ( ( ( ( ( ( ( ( ( ( "CN=" + ( tCommonName . getText ( ) ) ) + ",<seq2seq4repair_space>OU=" ) + ( tOrganizationalUnit . getText ( ) ) ) + ",<seq2seq4repair_space>O=" ) + ( tOrganization . getText ( ) ) ) + ",<seq2seq4repair_space>L=" ) + ( tLocation . getText ( ) ) ) + ",<seq2seq4repair_space>ST=" ) + ( tState . getText ( ) ) ) ) ; } if ( ( tCountry . getText ( ) . length ( ) ) > 0 ) { lPreview . setText ( ( ( ( ( ( ( ( ( ( ( ( "CN=" + ( tCommonName . getText ( ) ) ) + ",<seq2seq4repair_space>OU=" ) + ( tOrganizationalUnit . getText ( ) ) ) + ",<seq2seq4repair_space>O=" ) + ( tOrganization . getText ( ) ) ) + ",<seq2seq4repair_space>L=" ) + ( tLocation . getText ( ) ) ) + ",<seq2seq4repair_space>ST=" ) + ( tState . getText ( ) ) ) + ",<seq2seq4repair_space>C=" ) + ( tCountry . getText ( ) ) ) ) ; } if ( ( tKeyName . getText ( ) . length ( ) ) < ( Globals . KEY_ALIAS_MIN_SIZE ) ) { updateStatus ( enterNewKeyAlias ) ; return ; } if ( ( tKeyPassword . getText ( ) . length ( ) ) < ( Globals . KEY_PASSWORD_MIN_SIZE ) ) { updateStatus ( enterNewKeyPassword ) ; return ; } if ( ( cAlgorithm . getSelectionIndex ( ) ) < 0 ) { updateStatus ( selectKeyAlgorithm ) ; return ; } if ( ( tKeystore . getText ( ) . length ( ) ) == 0 ) { updateStatus ( selectKeyFile ) ; return ; } if ( ( tKeystorePassword . getText ( ) . length ( ) ) == 0 ) { updateStatus ( enterKeystorePassword ) ; return ; } if ( ( ( ( tKeystore . getText ( ) . length ( ) ) > 0 ) && ( ( tKeystorePassword . getText ( ) . length ( ) ) > 0 ) ) && ( ( tKeyName . getText ( ) . length ( ) ) > 0 ) ) { String file = tKeystore . getText ( ) ; keystoreName = file . substring ( ( ( file . lastIndexOf ( System . getProperty ( "file.separator" ) ) ) + 1 ) ) ; try { <START_BUG> keystore = new Keystore ( file , tKeystorePassword . getText ( ) , "JCEKS" ) ; <END_BUG> boolean loaded = keystore . load ( ) ; if ( loaded ) { if ( keystore . containsKey ( tKeyName . getText ( ) ) ) { setErrorMessage ( keyExistsInKeystore ) ; return ; } } else { setErrorMessage ( verifyKeystorePassword ) ; return ; } } catch ( Exception e ) { setErrorMessage ( verifyAll ) ; return ; } } setErrorMessage ( null ) ; updateStatus ( null ) ; } private void updateStatus ( final String message ) { } public void handleEvent ( final Event e ) { } private void echoPassword ( final Event e ) { } private void openKeystore ( ) { } private void generateCertificate ( ) throws Exception { } public void onEnterPage ( ) { } public IWizardPage getNextPage ( ) { } private void saveDataToModel ( ) { } }

Fix:
keystore = new Keystore ( file , tKeystorePassword . getText ( ) , Globals . KEYSTORE_TYPE ) ;