Buggy code:
public static LoginTable getUserLoginByUserName ( String userName ) { } public static LoginTable getUserLogin ( int userId ) { } public static LoginTable getUserLogin ( User user ) { } public static LoginTable getDefaultUserLogin ( User user ) { } public static LoginTable getDefaultUserLogin ( int userId ) { } public static LoginInfo getLoginInfo ( LoginTable login ) { } public static void deleteUserLogin ( int userId ) throws SQLException { } public static boolean isLoginInUse ( String login ) { } public static void deleteLogin ( LoginTable login ) { } public static LoginRecord recordLogin ( LoginTable login , String IPAddress ) { } public static LoginRecord recordLogin ( LoginTable login , String IPAddress , int asUser ) { } public static int getNumberOfSuccessfulLogins ( int iLoginID ) { } public static boolean hasLoggedIn ( LoginTable loginTable ) { } public static boolean recordLogout ( LoginRecord loginRecord ) { } public static boolean verifyPassword ( String user , String password ) { } protected static User getUser ( int userID ) throws RemoteException , FinderException { } public static LoginTable generateUserLogin ( int userID ) throws LoginCreateException , RemoteException { } public static String getGeneratedPasswordForUser ( ) { } public static String getGeneratedPasswordForUser ( User user ) { } private static List getPossibleGeneratedUserLogins ( User user ) { } public static List generatePossibleUserNames ( String first , String middle , String last , int userNameLength , Integer userid ) { int namelength = userNameLength ; char [ ] [ ] array = new char [ 196 ] [ namelength ] ; String alfabet = ( first + last ) + middle ; alfabet = alfabet . toLowerCase ( ) ; boolean rand = false ; char [ ] alfa = alfabet . toCharArray ( ) ; char [ ] digi = new String ( "012345679" ) . toCharArray ( ) ; int digilength = digi . length ; int alfalength = alfabet . length ( ) ; int index1 = 0 ; int index2 = first . length ( ) ; int index3 = ( ( last . length ( ) ) + ( middle . length ( ) ) ) - 3 ; int count1 = first . length ( ) ; int count2 = 0 ; String startletters = new String ( "ZWYX" ) ; int startlettercount = startletters . length ( ) ; int number = 1 ; ArrayList list = new ArrayList ( 196 ) ; Random random = new Random ( ) ; boolean breakit = false ; for ( int row = 0 ; ( row < ( array . length ) ) && ( ! breakit ) ; row ++ ) { int col = 0 ; for ( int j = 0 ; ( ( j < count1 ) && ( ( index1 + j ) < alfalength ) ) && ( col < namelength ) ; j ++ ) { array [ row ] [ ( col ++ ) ] = alfa [ ( index1 + j ) ] ; } if ( ! rand ) { for ( int j = 0 ; ( ( j < count2 ) && ( ( index2 + j ) < alfalength ) ) && ( col < namelength ) ; j ++ ) { array [ row ] [ ( col ++ ) ] = alfa [ ( index2 + j ) ] ; } } else { for ( int j = 0 ; ( ( j < count2 ) && ( ( index2 + j ) < alfalength ) ) && ( col < namelength ) ; j ++ ) { array [ row ] [ ( col ++ ) ] = digi [ random . nextInt ( digilength ) ] ; } } if ( ( count2 + count1 ) < namelength ) { if ( ( count1 > count2 ) && ( count1 < ( first . length ( ) ) ) ) { count1 ++ ; } else { count2 ++ ; } } else { if ( ( count1 > 1 ) && ( ( count2 + 1 ) <= ( last . length ( ) ) ) ) { count1 -- ; count2 ++ ; } else if ( ( index2 == ( first . length ( ) ) ) && ( ( middle . length ( ) ) > 0 ) ) { index2 = index3 ; count2 = 1 ; count1 = first . length ( ) ; } else <START_BUG> if ( ( ( alfa . length ) >= 6 ) && ( ( number ++ ) < 99 ) ) { <END_BUG> array [ row ] = ( ( alfabet . substring ( 0 , 6 ) ) + number ) . toCharArray ( ) ; } else if ( startlettercount > 0 ) { alfa = ( ( startletters . charAt ( ( ( startletters . length ( ) ) - startlettercount ) ) ) + alfabet ) . toCharArray ( ) ; index2 = ( first . length ( ) ) + 1 ; count2 = 1 ; count1 = ( first . length ( ) ) + 2 ; if ( ( ( first . length ( ) ) + 1 ) <= namelength ) { count1 -- ; } startlettercount -- ; } else { list . add ( ( "u" + ( userid . toString ( ) ) ) ) ; breakit = true ; } } list . add ( new String ( array [ row ] ) ) ; } list . trimToSize ( ) ; return list ; } public static void main ( String [ ] args ) { } public static void changeNextTime ( LoginTable login , boolean changeValue ) { } private static String getPropertyValue ( IWBundle iwb , String propertyName , String defaultValue ) { } No newline ; at end ; of file ; }

Fix:
if ( ( ( alfabet . length ( ) ) >= 6 ) && ( ( number ++ ) < 99 ) ) {