Buggy code:
public class PresenceContainerUI { protected RosterView rosterView = null ; protected IMessageSender messageSender = null ; protected IPresenceSender presenceSender = null ; protected IAccountManager accountManager = null ; protected IPresenceContainer pc = null ; protected ISharedObjectContainer soContainer = null ; protected User localUser = null ; protected ID groupID = null ; protected IContainer container ; public PresenceContainerUI ( IPresenceContainer 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.ui.view.rosterview" ) ; <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 ) { IStatus status = new Status ( IStatus . ERROR , ClientPlugin . getDefault ( ) . getBundle ( ) . getSymbolicName ( ) , IStatus . OK , "Exception<seq2seq4repair_space>showing<seq2seq4repair_space>presence<seq2seq4repair_space>view" , e ) ; ClientPlugin . getDefault ( ) . getLog ( ) . log ( status ) ; } } } ) ; pc . addMessageListener ( new IMessageListener ( ) { public void handleMessage ( final ID fromID , final ID toID , final Type type , final String subject , final String message ) { Display . getDefault ( ) . syncExec ( new Runnable ( ) { public void run ( ) { rosterView . handleMessage ( PresenceContainerUI . this . groupID , fromID , toID , type , subject , message ) ; } } ) ; } } ) ; pc . addPresenceListener ( new IPresenceListener ( ) { public void handleContainerJoined ( final ID joinedContainer ) { Display . getDefault ( ) . syncExec ( new Runnable ( ) { public void run ( ) { ILocalInputHandler handler = new ILocalInputHandler ( ) { public void inputText ( ID userID , String text ) { messageSender . sendMessage ( localUser , userID , null , null , text ) ; } public void startTyping ( ID userID ) { } public void disconnect ( ) { container . disconnect ( ) ; PresenceContainerUI . this . groupID = null ; } public void updatePresence ( ID userID , IPresence presence ) { presenceSender . sendPresenceUpdate ( localUser , userID , presence ) ; } public void sendRosterAdd ( String user , String name , String [ ] groups ) { presenceSender . sendRosterAdd ( localUser , user , name , groups ) ; } public void sendRosterRemove ( ID userID ) { presenceSender . sendRosterRemove ( localUser , userID ) ; } } ; PresenceContainerUI . this . groupID = joinedContainer ; rosterView . addAccount ( joinedContainer , PresenceContainerUI . this . localUser , handler , pc , soContainer ) ; } } ) ; } public void handleRosterEntry ( final IRosterEntry entry ) { Display . getDefault ( ) . syncExec ( new Runnable ( ) { public void run ( ) { rosterView . handleRosterEntry ( PresenceContainerUI . this . groupID , entry ) ; } } ) ; } public void handlePresence ( final ID fromID , final IPresence presence ) { Display . getDefault ( ) . syncExec ( new Runnable ( ) { public void run ( ) { rosterView . handlePresence ( PresenceContainerUI . this . groupID , fromID , presence ) ; } } ) ; } public void handleContainerDeparted ( final ID departedContainer ) { Display . getDefault ( ) . syncExec ( new Runnable ( ) { public void run ( ) { if ( ( rosterView ) != null ) { rosterView . accountDeparted ( departedContainer ) ; } } } ) ; messageSender = null ; rosterView = null ; } public void handleSetRosterEntry ( final IRosterEntry entry ) { Display . getDefault ( ) . syncExec ( new Runnable ( ) { public void run ( ) { rosterView . handleSetRosterEntry ( PresenceContainerUI . this . groupID , entry ) ; } } ) ; } } ) ; pc . addSubscribeListener ( new ISubscribeListener ( ) { public void handleSubscribeRequest ( final ID fromID , IPresence presence ) { Display . getDefault ( ) . syncExec ( new Runnable ( ) { public void run ( ) { try { IWorkbenchWindow ww = PlatformUI . getWorkbench ( ) . getActiveWorkbenchWindow ( ) ; ReceiveAuthorizeRequestDialog authRequest = new ReceiveAuthorizeRequestDialog ( ww . getShell ( ) , fromID . getName ( ) , localUser . getName ( ) ) ; authRequest . setBlockOnOpen ( true ) ; authRequest . open ( ) ; int res = authRequest . getButtonPressed ( ) ; if ( res == ( ReceiveAuthorizeRequestDialog . AUTHORIZE_AND_ADD ) ) { if ( ( presenceSender ) != null ) { presenceSender . sendPresenceUpdate ( localUser , fromID , new org . eclipse . ecf . presence . impl . Presence ( IPresence . Type . SUBSCRIBED ) ) ; if ( ( rosterView ) != null ) rosterView . sendRosterAdd ( localUser , fromID . getName ( ) , null ) ; } }

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