Buggy code:
public final class Client implements ISynchAsynchConnection { public static final String PROTOCOL = "ecftcp" ; public static final int DEFAULT_SNDR_PRIORITY = Thread . NORM_PRIORITY ; public static final int DEFAULT_RCVR_PRIORITY = Thread . NORM_PRIORITY ; public static final long DEFAULT_CLOSE_TIMEOUT = 2000 ; public static final int DEFAULT_MAX_BUFFER_MSG = 50 ; public static final int DEFAULT_WAIT_INTERVAL = 10 ; protected Socket socket ; private String addressPort = "-1:<no<seq2seq4repair_space>endpoint>:-1" ; protected ObjectOutputStream outputStream ; protected ObjectInputStream inputStream ; protected ISynchAsynchEventHandler handler ; protected SimpleFIFOQueue queue = new SimpleFIFOQueue ( ) ; protected int keepAlive = 0 ; protected Thread sendThread ; protected Thread rcvThread ; protected Thread keepAliveThread ; protected boolean isClosing = false ; protected boolean waitForPing = false ; protected PingMessage ping = new PingMessage ( ) ; protected PingResponseMessage pingResp = new PingResponseMessage ( ) ; protected int maxMsg = Client . DEFAULT_MAX_BUFFER_MSG ; protected long closeTimeout = Client . DEFAULT_CLOSE_TIMEOUT ; protected Map properties ; protected ID containerID = null ; protected Object pingLock = new Object ( ) ; boolean disconnectHandled = false ; private final Object disconnectLock = new Object ( ) ; private void setSocket ( Socket s ) throws SocketException { } public Client ( Socket aSocket , ObjectInputStream iStream , ObjectOutputStream oStream , ISynchAsynchEventHandler handler ) throws IOException { } public Client ( Socket aSocket , ObjectInputStream iStream , ObjectOutputStream oStream , ISynchAsynchEventHandler handler , int maxmsgs ) throws IOException { } public Client ( ISynchAsynchEventHandler handler , int maxmsgs ) { } public synchronized ID getLocalID ( ) { } public void removeListener ( IConnectionListener l ) { } public void addListener ( IConnectionListener l ) { } public synchronized boolean isConnected ( ) { } public synchronized boolean isStarted ( ) { } private void setSocketOptions ( Socket aSocket ) throws SocketException { } public synchronized Object connect ( ID remote , Object data , int timeout ) throws ECFException { debug ( ( ( ( ( ( ( "connect(" + remote ) + "," ) + data ) + "," ) + timeout ) + ")" ) ) ; if ( ( socket ) != null ) throw new ECFException ( Messages . Client_Already_Connected ) ; URI anURI = null ; try { anURI = new URI ( remote . getName ( ) ) ; } catch ( final URISyntaxException e ) { throw new ECFException ( ( ( Messages . Client_Invalid_URI ) + remote ) , e ) ; } SocketFactory fact = SocketFactory . getSocketFactory ( ) ; if ( fact == null ) fact = SocketFactory . getDefaultSocketFactory ( ) ; ConnectResultMessage res = null ; try { keepAlive = timeout ; final Socket s = fact . createSocket ( anURI . getHost ( ) , anURI . getPort ( ) , keepAlive ) ; setSocketOptions ( s ) ; setSocket ( s ) ; outputStream = new ObjectOutputStream ( s . getOutputStream ( ) ) ; outputStream . flush ( ) ; inputStream = new ObjectInputStream ( s . getInputStream ( ) ) ; debug ( ( "connect;" + anURI ) ) ; send ( new ConnectRequestMessage ( anURI , ( ( Serializable ) ( data ) ) ) ) ; res = ( ( ConnectResultMessage ) ( readObject ( ) ) ) ; } catch ( final Exception e ) { <START_BUG> throw new ECFException ( e . getLocalizedMessage ( ) , e ) ; <END_BUG> } debug ( ( "connect;rcv:" + res ) ) ; setupThreads ( ) ; final Object ret = res . getData ( ) ; debug ( ( "connect;returning:" + ret ) ) ; return ret ; } private void setupThreads ( ) { } Thread getSendThread ( ) { } void handleException ( Throwable e ) { } private void closeSocket ( ) { } void send ( Serializable snd ) throws IOException { } private void handlePingResp ( ) { } public void setCloseTimeout ( long t ) { } private void sendClose ( Serializable snd ) throws IOException { } Thread getRcvThread ( ) { } void handleRcv ( Serializable rcv ) throws IOException { } public synchronized void start ( ) { } public void stop ( ) { } private Thread setupPing ( ) { } public synchronized void disconnect ( ) { } public void sendAsynch ( ID recipient , byte [ ] obj ) throws IOException { } public void sendAsynch ( ID recipient , Object obj ) throws IOException { } public synchronized void queueObject ( ID recipient , Serializable obj ) throws IOException { } public synchronized Serializable sendObject ( ID recipient , Serializable obj ) throws IOException { } public Object sendSynch ( ID rec , Object obj ) throws IOException { } public Object sendSynch ( ID rec , byte [ ] obj ) throws IOException { } Serializable readObject ( ) throws IOException { } public Map getProperties ( ) { } public Object getAdapter ( Class clazz ) { } String getAddressPort ( ) { } protected void debug ( String msg ) { } protected void traceStack ( String msg , Throwable e ) { } public void setProperties ( Map props ) { } }

Fix:
throw new ECFException ( ( "Exception<seq2seq4repair_space>during<seq2seq4repair_space>connection<seq2seq4repair_space>to<seq2seq4repair_space>" + ( remote . getName ( ) ) ) , e ) ;