Buggy code:
public class XMPPContainerPresenceHelper implements ISharedObject { ISharedObjectConfig config = null ; Vector messageListeners = new Vector ( ) ; Vector sharedObjectMessageListeners = new Vector ( ) ; XMPPContainer container = null ; XMPPChatManager chatManager = null ; Vector presenceListeners = new Vector ( ) ; public XMPPContainerPresenceHelper ( XMPPContainer container ) { } public void init ( ISharedObjectConfig initData ) throws SharedObjectInitException { } public void handleEvent ( Event event ) { } public void handleEvents ( Event [ ] events ) { } public void dispose ( ID containerID ) { } public Object getAdapter ( Class clazz ) { } protected Roster roster ; protected XMPPContainerPresenceHelper . PresenceRosterManager rosterManager ; class PresenceRosterManager extends AbstractRosterManager { public PresenceRosterManager ( org . eclipse . ecf . presence . roster . Roster roster ) { } public void notifySubscriptionListener ( ID fromID , IPresence presence ) { } public void notifyRosterUpdate ( IRosterItem changedItem ) { } public void setUser ( IUser user ) { } IPresenceSender rosterPresenceSender = new IPresenceSender ( ) { public void sendPresenceUpdate ( ID toID , IPresence presence ) throws ECFException { } } ; public IPresenceSender getPresenceSender ( ) { } IRosterSubscriptionSender rosterSubscriptionSender = new IRosterSubscriptionSender ( ) { public void sendRosterAdd ( String user , String name , String [ ] groups ) throws ECFException { } public void sendRosterRemove ( ID userID ) throws ECFException { } } ; public IRosterSubscriptionSender getRosterSubscriptionSender ( ) { } public void addPresenceListener ( IPresenceListener listener ) { } public void removePresenceListener ( IPresenceListener listener ) { } } public IRosterManager getRosterManager ( ) { } public void setUser ( IUser user ) { } protected void addSharedObjectMessageListener ( ISharedObjectMessageListener listener ) { } protected void sendTypingMessage ( ID toID , boolean isTyping , String body ) throws IOException { } protected void handleSharedObjectMessageEvent ( ISharedObjectMessageEvent event ) { } protected void removeSharedObjectMessageListener ( ISharedObjectMessageListener listener ) { } private void addToRoster ( IRosterItem [ ] items ) { } protected ISharedObjectContext getContext ( ) { } protected String getUserNameFromXMPPAddress ( XMPPID userID ) { } protected IRosterEntry createRosterEntry ( RosterEntry entry ) { } protected IRosterEntry createRosterEntry ( RosterPacket . Item entry ) { } protected void handleIQEvent ( IQEvent evt ) { } protected void fireSetRosterEntry ( boolean remove , IRosterEntry entry ) { for ( Iterator i = presenceListeners . iterator ( ) ; i . hasNext ( ) ; ) { IPresenceListener l = ( ( IPresenceListener ) ( i . next ( ) ) ) ; if ( remove ) l . handleRosterEntryRemove ( entry ) ; else <START_BUG> l . handleRosterEntryUpdate ( entry ) ; <END_BUG> } } private void removeItemFromRoster ( Collection rosterItems , XMPPID itemIDToRemove ) { } private boolean removeItemFromRosterGroup ( RosterGroup group , XMPPID itemIDToRemove ) { } protected void handleMessageEvent ( MessageEvent evt ) { } protected void handlePresenceEvent ( PresenceEvent evt ) { } private void firePresenceListeners ( ID fromID , IPresence presence ) { } private void updatePresence ( XMPPID fromID , IPresence newPresence ) { } private void updatePresenceForMatchingEntry ( org . eclipse . ecf . presence . roster . RosterEntry entry , XMPPID fromID , IPresence newPresence ) { } private void updatePresenceInGroup ( IRosterGroup group , XMPPID fromID , IPresence newPresence ) { } protected void handleRoster ( Roster roster ) { } protected XMPPID createIDFromName ( String uname ) { } protected ID createThreadID ( String thread ) { } protected IPresence createIPresence ( Presence xmppPresence , byte [ ] photoData ) { } protected Presence createPresence ( IPresence ipresence ) { } protected Mode createIPresenceMode ( Presence xmppPresence ) { } protected Mode createPresenceMode ( IPresence ipresence ) { } protected Type createIPresenceType ( Presence xmppPresence ) { } protected Type createPresenceType ( IPresence ipresence ) { } protected IRosterItem [ ] createRosterEntries ( RosterEntry entry ) { } private IRosterItem [ ] createRosterEntries ( Iterator grps , IRosterItem parent , IUser user ) { } protected IRosterEntry createRosterEntry ( ID userID , String name , Iterator grps ) { } private void createRosterEntries ( IRosterItem parent , IUser user , List result ) { } private RosterEntry findRosterEntry ( RosterGroup rosterGroup , IUser user ) { } private RosterEntry findRosterEntry ( Collection entries , IUser user ) { } protected IRosterItem [ ] createRosterEntries ( RosterPacket . Item entry ) { } protected org . jivesoftware . smack . RosterGroup findRosterGroup ( Object parent , String grp ) { } protected ECFConnection getConnectionOrThrowIfNull ( ) throws IOException { } protected void traceAndThrowECFException ( String msg , Throwable t ) throws ECFException { } protected void trace ( String msg ) { } protected void traceStack ( String msg , Throwable e ) { } protected ID createRoomIDFromName ( String from ) { } protected ID createUserIDFromName ( String name ) { } protected Type [ ] ALLOWED_MESSAGES = new Type [ ] { Type . CHAT , Type . ERROR , Type . HEADLINE , Type . NORMAL } ; protected Message filterMessageType ( Message msg ) { } public IChatManager getChatManager ( ) { } }

Fix:
l . handleRosterEntryAdd ( entry ) ;