Buggy code:
public final class Client implements ISynchAsynchConnection { public static class Creator implements ISynchAsynchConnectionInstantiator { public ISynchAsynchConnection makeInstance ( ConnectionDescription description , ISynchAsynchConnectionEventHandler handler , Class [ ] clazzes , Object [ ] args ) throws ConnectionInstantiationException { } } public static final String PROTOCOL = "ecftcp" ; protected static final Trace trace = Trace . create ( "connection" ) ; public static final int SNDR_PRIORITY = Thread . NORM_PRIORITY ; public static final int RCVR_PRIORITY = Thread . NORM_PRIORITY ; public static final long CLOSE_TIMEOUT = 2000 ; public static final int DEF_MAX_MSG = 50 ; protected Socket socket ; private String addressPort = "-1:<no<seq2seq4repair_space>endpoint>:-1" ; protected ObjectOutputStream outputStream ; protected ObjectInputStream inputStream ; protected ISynchAsynchConnectionEventHandler handler ; protected SimpleQueueImpl queue = new SimpleQueueImpl ( ) ; 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 long nextPingTime ; protected int maxMsg = Client . DEF_MAX_MSG ; protected long closeTimeout = Client . CLOSE_TIMEOUT ; protected Vector eventNotify = null ; protected Map properties ; protected ID containerID = null ; public Map getProperties ( ) { } public Object getAdapter ( Class clazz ) { } private String getAddressPort ( ) { } protected void trace ( String msg ) { } protected void dumpStack ( String msg , Throwable e ) { } public void setProperties ( Map props ) { } public Client ( Socket aSocket , ObjectInputStream iStream , ObjectOutputStream oStream , ISynchAsynchConnectionEventHandler handler , int keepAlive ) throws IOException { } private void setSocket ( Socket s ) throws SocketException { } public Client ( Socket aSocket , ObjectInputStream iStream , ObjectOutputStream oStream , ISynchAsynchConnectionEventHandler handler , int keepAlive , int maxmsgs ) throws IOException { } public Client ( ISynchAsynchConnectionEventHandler handler , Integer keepAlive ) { } public Client ( ISynchAsynchConnectionEventHandler handler , int keepAlive ) { } public Client ( ISynchAsynchConnectionEventHandler handler , int keepAlive , int maxmsgs ) { } public synchronized ID getLocalID ( ) { if ( ( containerID ) != null ) return containerID ; if ( ( socket ) == null ) return null ; ID retID = null ; try { <START_BUG> retID = IDFactory . makeStringID ( ( ( ( ( ( Client . PROTOCOL ) + ":////" ) + ( socket . getLocalAddress ( ) . getHostName ( ) ) ) + ":" ) + ( socket . getLocalPort ( ) ) ) ) ; <END_BUG> } catch ( Exception e ) { return null ; } return retID ; } public synchronized void removeCommEventListener ( IConnectionEventHandler l ) { } public synchronized void addCommEventListener ( IConnectionEventHandler l ) { } public synchronized boolean isConnected ( ) { } public synchronized boolean isStarted ( ) { } protected void fireSuspect ( Exception e ) { } public synchronized Object connect ( ID remote , Object data , int timeout ) throws IOException { } private void setupThreads ( ) { } private Thread getSendThread ( ) { } private void closeSocket ( ) { } private void sendIt ( Serializable snd ) throws IOException { } private void receiveResp ( ) { } public void setCloseTimeout ( long t ) { } private void sendClose ( Serializable snd ) throws IOException { } private Thread getRcvThread ( ) { } private void handleRcv ( Serializable rcv ) throws IOException { } public synchronized void start ( ) { } public void stop ( ) { } private Thread setupPing ( ) { } public synchronized void disconnect ( ) throws IOException { } 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 { } private Serializable readObject ( ) throws IOException { } }

Fix:
retID = IDFactory . getDefault ( ) . makeStringID ( ( ( ( ( ( Client . PROTOCOL ) + ":////" ) + ( socket . getLocalAddress ( ) . getHostName ( ) ) ) + ":" ) + ( socket . getLocalPort ( ) ) ) ) ;