Buggy code:
public class MultiRosterView extends ViewPart implements IMultiRosterViewPart , IChatRoomViewCloseListener { public static final String VIEW_ID = "org.eclipse.ecf.presence.ui.MultiRosterView" ; protected static final int DEFAULT_EXPAND_LEVEL = 3 ; protected TreeViewer treeViewer ; protected List rosterAccounts = new ArrayList ( ) ; private Hashtable chatRooms = new Hashtable ( ) ; private IMenuManager setStatusMenu ; private IAction imAction ; private IAction removeAction ; private IAction setAvailableAction ; private IAction setAwayAction ; private IAction setDNDAction ; private IAction setInvisibleAction ; private IAction setOfflineAction ; private IAction openChatRoomAction ; private IAction openAccountChatRoomAction ; private IRosterSubscriptionListener subscriptionListener ; private IPresenceListener presenceListener ; private ViewerFilter showOfflineFilter = new ViewerFilter ( ) { public boolean select ( Viewer viewer , Object parentElement , Object element ) { } } ; private ViewerFilter showEmptyGroupsFilter = new ViewerFilter ( ) { public boolean select ( Viewer viewer , Object parentElement , Object element ) { } } ; public void createPartControl ( Composite parent ) { } protected String getRosterEntryChildrenFromPresence ( IRosterEntry entry ) { } protected void setupTreeViewer ( Composite parent ) { } private void retrieveServices ( ) { IPresenceService [ ] services = Activator . getDefault ( ) . getPresenceServices ( ) ; for ( int i = 0 ; i < ( services . length ) ; i ++ ) { IContainer container = ( ( IContainer ) ( services [ i ] . getAdapter ( IContainer . class ) ) ) ; <START_BUG> if ( container != null ) { <END_BUG> addContainer ( container ) ; } } } private String getChatRoomSecondaryID ( ID roomID ) { } private void showChatRooms ( IChatRoomManager [ ] managers ) { } private void addRoomView ( MultiRosterView . RoomWithAView roomView ) { } private MultiRosterView . RoomWithAView getRoomView ( String id ) { } private void removeRoomView ( MultiRosterView . RoomWithAView roomView ) { } public void chatRoomViewClosing ( String secondaryID ) { } private IConnectContext getChatJoinContext ( final String windowText ) { } private void makeActions ( ) { } private void sendPresence ( IPresence . Mode mode ) { } private void hookContextMenu ( ) { } private void fillContextMenu ( IMenuManager manager ) { } private IRosterEntry find ( Collection items , ID userID ) { } private void remove ( IRosterEntry entry ) { } private void message ( IStructuredSelection iss ) { } private void contributeToActionBars ( ) { } private void fillLocalPullDown ( IMenuManager manager ) { } public void dispose ( ) { } protected boolean addRosterAccount ( MultiRosterAccount account ) { } public void setFocus ( ) { } protected void refreshTreeViewer ( Object val , boolean labels ) { } public boolean addContainer ( IContainer container ) { } private class RosterSubscriptionListener implements IRosterSubscriptionListener { public void handleSubscribeRequest ( ID fromID ) { } public void handleSubscribed ( ID fromID ) { } public void handleUnsubscribed ( ID fromID ) { } } private class PresenceListener implements IPresenceListener { public void handleRosterEntryAdd ( final IRosterEntry entry ) { } public void handleRosterEntryRemove ( IRosterEntry entry ) { } public void handlePresence ( ID fromID , IPresence presence ) { } } private class ViewerToolTip extends ToolTip { public static final String HEADER_BG_COLOR = ( Activator . PLUGIN_ID ) + ".TOOLTIP_HEAD_BG_COLOR" ; public static final String HEADER_FONT = ( Activator . PLUGIN_ID ) + ".TOOLTIP_HEAD_FONT" ; public ViewerToolTip ( Control control ) { } protected Composite createToolTipContentArea ( Event event , Composite parent ) { } protected Composite createContentArea ( Composite parent , IRosterEntry entry ) { } protected boolean shouldCreateToolTip ( Event e ) { } } class RoomWithAView { IChatRoomContainer container ; ChatRoomView view ; String secondaryID ; RoomWithAView ( IChatRoomContainer container , ChatRoomView view , String secondaryID ) { } public IChatRoomContainer getContainer ( ) { } public ChatRoomView getView ( ) { } public String getID ( ) { } } }

Fix:
if ( ( container != null ) && ( ( container . getConnectedID ( ) ) != null ) ) {