Buggy code:
public class ECFConnection implements ISynchAsynchConnection , IIMMessageSender { public static final String CLIENT_TYPE = "ECF_XMPP" ; public static final Trace trace = Trace . create ( "smackconnection" ) ; public static final Trace smack = Trace . create ( "smackdebug" ) ; protected static final String STRING_ENCODING = "UTF-8" ; public static final String OBJECT_PROPERTY_NAME = ( ECFConnection . class . getName ( ) ) + ".object" ; protected static final int XMPP_NORMAL_PORT = 5222 ; protected XMPPConnection connection = null ; protected IAsynchConnectionEventHandler handler = null ; protected ID localID = null ; protected boolean isStarted = false ; protected String serverName ; protected int serverPort = - 1 ; protected Map properties = null ; protected boolean isConnected = false ; protected Namespace namespace = null ; protected boolean google = false ; protected boolean secure = false ; protected void debug ( String msg ) { } protected void dumpStack ( String msg , Throwable t ) { } protected void logException ( String msg , Throwable t ) { } public Map getProperties ( ) { } public Object getAdapter ( Class clazz ) { } public XMPPConnection getXMPPConnection ( ) { } public ECFConnection ( boolean google , Namespace ns , IAsynchConnectionEventHandler h , boolean secure ) { } public ECFConnection ( boolean google , Namespace ns , IAsynchConnectionEventHandler h ) { } protected String getPasswordForObject ( Object data ) { } protected XMPPID getXMPPID ( ID remote ) throws IOException { } public synchronized Object connect ( ID remote , Object data , int timeout ) throws IOException { } public synchronized void disconnect ( ) throws IOException { } public synchronized boolean isConnected ( ) { } public synchronized ID getLocalID ( ) { if ( ! ( isConnected ( ) ) ) return null ; try { <START_BUG> return IDFactory . getDefault ( ) . makeID ( namespace . getName ( ) , new Object [ ] { connection . getConnectionID ( ) } ) ; <END_BUG> } catch ( Exception e ) { logException ( "Exception<seq2seq4repair_space>in<seq2seq4repair_space>getLocalID" , e ) ; return null ; } } public synchronized void start ( ) { } public boolean isStarted ( ) { } public synchronized void stop ( ) { } protected void handleConnectionClosed ( Exception e ) { } protected void handlePacket ( Packet arg0 ) { } public synchronized void sendAsynch ( ID receiver , byte [ ] data ) throws IOException { } protected void sendMessage ( ID receiver , Message aMsg ) throws IOException { } public synchronized Object sendSynch ( ID receiver , byte [ ] data ) throws IOException { } public void addCommEventListener ( IConnectionEventHandler listener ) { } public void removeCommEventListener ( IConnectionEventHandler listener ) { } public void sendMessage ( ID target , String message ) throws IOException { } public void sendPresenceUpdate ( ID target , Presence presence ) throws IOException { } public void sendRosterAdd ( String user , String name , String [ ] groups ) throws IOException { } public void sendRosterRemove ( String user ) throws IOException { } public Roster getRoster ( ) throws IOException { } }

Fix:
return IDFactory . getDefault ( ) . createID ( namespace . getName ( ) , new Object [ ] { connection . getConnectionID ( ) } ) ;