Buggy code:
public class PresenceContainerUI { protected static final int SEND_ERRORCODE = 2001 ; protected RosterView rosterView = null ; protected IPresenceSender presenceSender = null ; protected IAccountManager accountManager = null ; protected IRosterSubscriptionSender rosterSubscriptionSender = null ; protected IPresenceContainerAdapter pc = null ; protected ISharedObjectContainer soContainer = null ; protected User localUser = null ; protected ID groupID = null ; protected IContainer container ; protected IChatManager chatManager ; protected IChatMessageSender chatMessageSender ; protected ITypingMessageSender typingMessageSender ; public PresenceContainerUI ( IPresenceContainerAdapter pc ) { } protected void setup ( final IContainer container , final ID localUser , final String nick ) { this . container = container ; this . soContainer = ( ( ISharedObjectContainer ) ( this . container . getAdapter ( ISharedObjectContainer . class ) ) ) ; Display . getDefault ( ) . syncExec ( new Runnable ( ) { public void run ( ) { try { IWorkbenchWindow ww = PlatformUI . getWorkbench ( ) . getActiveWorkbenchWindow ( ) ; IWorkbenchPage wp = ww . getActivePage ( ) ; <START_BUG> IViewPart view = wp . showView ( "org.eclipse.ecf.example.collab.ui.CollabRosterView" ) ; <END_BUG> rosterView = ( ( RosterView ) ( view ) ) ; String nickname = null ; if ( nick != null ) { nickname = nick ; } else { String name = localUser . getName ( ) ; nickname = name . substring ( 0 , name . indexOf ( "@" ) ) ; } PresenceContainerUI . this . localUser = new User ( localUser , nickname ) ; } catch ( Exception e ) { ClientPlugin . getDefault ( ) . getLog ( ) . log ( new Status ( IStatus . ERROR , ClientPlugin . PLUGIN_ID , PresenceContainerUI . SEND_ERRORCODE , "Exception<seq2seq4repair_space>showing<seq2seq4repair_space>presence<seq2seq4repair_space>view" , e ) ) ; } } } ) ; chatManager . addMessageListener ( new IIMMessageListener ( ) { public void handleMessageEvent ( final IIMMessageEvent chatMessageEvent ) { Display . getDefault ( ) . syncExec ( new Runnable ( ) { public void run ( ) { if ( chatMessageEvent instanceof IChatMessageEvent ) { rosterView . handleMessageEvent ( chatMessageEvent ) ; } else if ( chatMessageEvent instanceof ITypingMessageEvent ) { rosterView . handleTyping ( chatMessageEvent . getFromID ( ) ) ; } } } ) ; } } ) ; container . addListener ( new IContainerListener ( ) { public void handleEvent ( IContainerEvent event ) { if ( event instanceof IContainerConnectedEvent ) { IContainerConnectedEvent cce = ( ( IContainerConnectedEvent ) ( event ) ) ; final ID joinedContainer = cce . getTargetID ( ) ; Display . getDefault ( ) . syncExec ( new Runnable ( ) { public void run ( ) { ILocalInputHandler handler = new ILocalInputHandler ( ) { public void inputText ( ID userID , String text ) { try { if ( ( chatMessageSender ) != null ) chatMessageSender . sendChatMessage ( userID , text ) ; } catch ( ECFException e ) { ClientPlugin . getDefault ( ) . getLog ( ) . log ( new Status ( IStatus . ERROR , ClientPlugin . getDefault ( ) . getBundle ( ) . getSymbolicName ( ) , PresenceContainerUI . SEND_ERRORCODE , "Error<seq2seq4repair_space>in<seq2seq4repair_space>sendMessage" , e ) ) ; } } public void startTyping ( ID userID ) { try { if ( ( typingMessageSender ) != null ) typingMessageSender . sendTypingMessage ( userID , true , "" ) ; } catch ( ECFException e ) { ClientPlugin . getDefault ( ) . getLog ( ) . log ( new Status ( IStatus . ERROR , ClientPlugin . getDefault ( ) . getBundle ( ) . getSymbolicName ( ) , PresenceContainerUI . SEND_ERRORCODE , "Error<seq2seq4repair_space>in<seq2seq4repair_space>startTyping" , e ) ) ; } } public void disconnect ( ) { container . disconnect ( ) ; } public void updatePresence ( ID userID , IPresence presence ) { try { if ( ( presenceSender ) != null ) presenceSender . sendPresenceUpdate ( userID , presence ) ; } catch ( ECFException e ) { ClientPlugin . getDefault ( ) . getLog ( ) . log ( new Status ( IStatus . ERROR , ClientPlugin . getDefault ( ) . getBundle ( ) . getSymbolicName ( ) , PresenceContainerUI . SEND_ERRORCODE , "Error<seq2seq4repair_space>in<seq2seq4repair_space>sendPresenceUpdate" , e ) ) ; } } public void sendRosterAdd ( String user , String name , String [ ] groups ) { try { rosterSubscriptionSender . sendRosterAdd ( user , name , groups ) ; } catch ( ECFException e ) { ClientPlugin . getDefault ( ) . getLog ( ) . log ( new Status ( IStatus . ERROR , ClientPlugin . getDefault ( ) . getBundle ( ) . getSymbolicName ( ) , PresenceContainerUI . SEND_ERRORCODE , "Error<seq2seq4repair_space>in<seq2seq4repair_space>sendRosterAdd" , e ) ) ; } } public void sendRosterRemove ( ID userID ) { try { if ( ( rosterSubscriptionSender ) != null ) rosterSubscriptionSender . sendRosterRemove ( userID ) ; } catch ( ECFException e ) { ClientPlugin . getDefault ( ) . getLog ( ) . log ( new Status ( IStatus . ERROR , ClientPlugin . getDefault ( ) . getBundle ( ) . getSymbolicName ( ) , PresenceContainerUI . SEND_ERRORCODE , "Error<seq2seq4repair_space>in<seq2seq4repair_space>sendRosterRemove" , e ) ) ; } } } ; PresenceContainerUI . this . groupID = joinedContainer ; rosterView . addAccount ( joinedContainer , PresenceContainerUI . this . localUser , handler , container , pc , soContainer ) ; } } ) ; } else if ( event instanceof IContainerDisconnectedEvent ) { final IContainerDisconnectedEvent de = ( ( IContainerDisconnectedEvent ) ( event ) ) ; Display . getDefault ( ) . syncExec ( new Runnable ( ) { public void run ( ) { rosterView . accountDisconnected ( de . getTargetID ( ) ) ; } } ) ; } } } ) ;

Fix:
IViewPart view = wp . showView ( "org.eclipse.ecf.ui.view.rosterview" ) ;