Buggy code:
public class ConnectionFactoryImpl extends ConnectionFactory { private static final int AUTH_REQ_OK = 0 ; private static final int AUTH_REQ_KRB4 = 1 ; private static final int AUTH_REQ_KRB5 = 2 ; private static final int AUTH_REQ_PASSWORD = 3 ; private static final int AUTH_REQ_CRYPT = 4 ; private static final int AUTH_REQ_MD5 = 5 ; private static final int AUTH_REQ_SCM = 6 ; private static final int AUTH_REQ_GSS = 7 ; private static final int AUTH_REQ_GSS_CONTINUE = 8 ; private static final int AUTH_REQ_SSPI = 9 ; private static class UnsupportedProtocolException extends IOException { } public ProtocolConnection openConnectionImpl ( HostSpec [ ] hostSpecs , String user , String database , Properties info , Logger logger ) throws SQLException { } private String createPostgresTimeZone ( ) { } private PGStream enableSSL ( PGStream pgStream , boolean requireSSL , Properties info , Logger logger ) throws IOException , SQLException { if ( logger . logDebug ( ) ) logger . debug ( "<seq2seq4repair_space>FE=><seq2seq4repair_space>SSLRequest" ) ; pgStream . SendInteger4 ( 8 ) ; pgStream . SendInteger2 ( 1234 ) ; pgStream . SendInteger2 ( 5679 ) ; pgStream . flush ( ) ; int beresp = pgStream . ReceiveChar ( ) ; switch ( beresp ) { case 'E' : if ( logger . logDebug ( ) ) logger . debug ( "<seq2seq4repair_space><=BE<seq2seq4repair_space>SSLError" ) ; if ( requireSSL ) throw new org . postgresql . util . PSQLException ( GT . tr ( "The<seq2seq4repair_space>server<seq2seq4repair_space>does<seq2seq4repair_space>not<seq2seq4repair_space>support<seq2seq4repair_space>SSL." ) , PSQLState . CONNECTION_REJECTED ) ; pgStream . close ( ) ; return new PGStream ( pgStream . getHostSpec ( ) ) ; case 'N' : if ( logger . logDebug ( ) ) logger . debug ( "<seq2seq4repair_space><=BE<seq2seq4repair_space>SSLRefused" ) ; if ( requireSSL ) throw new org . postgresql . util . PSQLException ( GT . tr ( "The<seq2seq4repair_space>server<seq2seq4repair_space>does<seq2seq4repair_space>not<seq2seq4repair_space>support<seq2seq4repair_space>SSL." ) , PSQLState . CONNECTION_REJECTED ) ; return pgStream ; case 'S' : if ( logger . logDebug ( ) ) logger . debug ( "<seq2seq4repair_space><=BE<seq2seq4repair_space>SSLOk" ) ; MakeSSL . convert ( pgStream , info , logger ) ; return pgStream ; default : <START_BUG> throw new org . postgresql . util . PSQLException ( GT . tr ( "An<seq2seq4repair_space>error<seq2seq4repair_space>occured<seq2seq4repair_space>while<seq2seq4repair_space>setting<seq2seq4repair_space>up<seq2seq4repair_space>the<seq2seq4repair_space>SSL<seq2seq4repair_space>connection." ) , PSQLState . PROTOCOL_VIOLATION ) ; <END_BUG> } } private void sendStartupPacket ( PGStream pgStream , String [ ] [ ] params , Logger logger ) throws IOException { } private void doAuthentication ( PGStream pgStream , String host , String user , Properties info , Logger logger ) throws IOException , SQLException { } private void readStartupMessages ( PGStream pgStream , ProtocolConnectionImpl protoConnection , Logger logger ) throws IOException , SQLException { } private void runInitialQueries ( ProtocolConnection protoConnection , Properties info , Logger logger ) throws SQLException { } }

Fix:
throw new org . postgresql . util . PSQLException ( GT . tr ( "An<seq2seq4repair_space>error<seq2seq4repair_space>occurred<seq2seq4repair_space>while<seq2seq4repair_space>setting<seq2seq4repair_space>up<seq2seq4repair_space>the<seq2seq4repair_space>SSL<seq2seq4repair_space>connection." ) , PSQLState . PROTOCOL_VIOLATION ) ;