Buggy code:
public class MultiRosterView extends ViewPart implements IMultiRosterViewPart { public static final String VIEW_ID = "org.eclipse.ecf.presence.ui.MultiRosterView" ; protected static final int DEFAULT_EXPAND_LEVEL = 3 ; protected TreeViewer treeViewer ; protected MultiRosterLabelProvider multiRosterLabelProvider ; protected MultiRosterContentProvider multiRosterContentProvider ; protected List rosterAccounts = new ArrayList ( ) ; private IAction imAction ; private IAction removeAction ; private IAction setAvailableAction ; private IAction setAwayAction ; private IAction setDNDAction ; private IAction setInvisibleAction ; private IAction setOfflineAction ; private IRosterSubscriptionListener subscriptionListener ; public void createPartControl ( Composite parent ) { } protected String getRosterEntryChildrenFromPresence ( IRosterEntry entry ) { } protected void setupTreeViewer ( Composite parent ) { } private void makeActions ( ) { } private void sendPresence ( IPresence . Mode mode ) { } private void hookContextMenu ( ) { } private void fillContextMenu ( IMenuManager manager ) { } private boolean find ( Collection items , Object entry ) { } private IRosterEntry find ( Collection items , ID userID ) { } private void remove ( IRosterEntry entry ) { } private void message ( IStructuredSelection iss ) { Object element = iss . getFirstElement ( ) ; if ( ! ( element instanceof IRosterEntry ) ) { return ; } IRosterEntry entry = ( ( IRosterEntry ) ( element ) ) ; synchronized ( rosterAccounts ) { for ( Iterator i = rosterAccounts . iterator ( ) ; i . hasNext ( ) ; ) { MultiRosterAccount account = ( ( MultiRosterAccount ) ( i . next ( ) ) ) ; IRoster roster = account . getRoster ( ) ; if ( find ( roster . getItems ( ) , entry ) ) { IChatMessageSender icms = account . getPresenceContainerAdapter ( ) . getChatManager ( ) . getChatMessageSender ( ) ; try { MessagesView view = ( ( MessagesView ) ( getSite ( ) . getWorkbenchWindow ( ) . getActivePage ( ) . showView ( MessagesView . VIEW_ID ) ) ) ; <START_BUG> view . openTab ( icms , entry . getUser ( ) . getID ( ) ) ; <END_BUG> } catch ( PartInitException e ) { e . printStackTrace ( ) ; } break ; } } } } private void contributeToActionBars ( ) { } private void fillLocalPullDown ( IMenuManager manager ) { } public void dispose ( ) { } protected void addRosterAccountsToProviders ( ) { } protected boolean addRosterAccount ( MultiRosterAccount account ) { } protected boolean removeRosterAccount ( 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 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 ) { } } }

Fix:
view . selectTab ( icms , entry . getUser ( ) . getID ( ) ) ;