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 ; private static final String ROSTER_VIEWER_DROP_TARGET_EPOINT = ( ( Activator . PLUGIN_ID ) + "." ) + "rosterViewerDropTarget" ; private static final String ROSTER_VIEWER_DROP_TARGET_CLASS_ATTR = "class" ; private static final Transfer [ ] dndTransferTypes = new Transfer [ ] { EditorInputTransfer . getInstance ( ) , FileTransfer . getInstance ( ) , HTMLTransfer . getInstance ( ) , LocalSelectionTransfer . getTransfer ( ) , PluginTransfer . getInstance ( ) , RTFTransfer . getInstance ( ) , TextTransfer . getInstance ( ) } ; private static final int dndOperations = ( ( DND . DROP_COPY ) | ( DND . DROP_MOVE ) ) | ( DND . DROP_LINK ) ; 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 showOfflineAction ; private IAction showEmptyGroupsAction ; private IAction addContactAction ; private IAction openChatRoomAction ; private IAction openAccountChatRoomAction ; private IAction changePasswordAction ; private IAction disconnectAllAccountsAction ; private IAction disconnectAccountAction ; private IPresenceListener presenceListener ; private MultiRosterView . RosterViewerDropAdapter dropAdapter ; private ViewerFilter hideOfflineFilter = new ViewerFilter ( ) { public boolean select ( Viewer viewer , Object parentElement , Object element ) { } } ; private ViewerFilter hideEmptyGroupsFilter = new ViewerFilter ( ) { public boolean select ( Viewer viewer , Object parentElement , Object element ) { } } ; public void createPartControl ( Composite parent ) { } protected void setupTreeViewer ( Composite parent ) { } class RosterViewerDropAdapter extends ViewerDropAdapter { private List rosterDropTargets = new ArrayList ( ) ; private List rosterPerformDrop = new ArrayList ( ) ; public RosterViewerDropAdapter ( TreeViewer treeViewer , IRosterViewerDropTarget dropTarget ) { } public boolean addRosterDropTarget ( IRosterViewerDropTarget rosterDropTarget ) { } public boolean performDrop ( Object data ) { } public void dispose ( ) { } public boolean validateDrop ( Object target , int operation , TransferData transferType ) { <START_BUG> if ( ( target != null ) && ( target instanceof IRosterItem ) ) { <END_BUG> rosterPerformDrop . clear ( ) ; boolean result = false ; for ( Iterator i = rosterDropTargets . iterator ( ) ; i . hasNext ( ) ; ) { IRosterViewerDropTarget rdt = ( ( IRosterViewerDropTarget ) ( i . next ( ) ) ) ; if ( rdt . validateDrop ( ( ( IRosterItem ) ( target ) ) , operation , transferType ) ) { result = true ; rosterPerformDrop . add ( rdt ) ; } } return result ; } return false ; } } private void hookDropSupport ( ) { } private void retrieveServices ( ) { } protected IChatRoomCommandListener createChatRoomCommandListener ( ) { } protected IChatRoomViewCloseListener createChatRoomViewCloseListener ( final ID connectedID ) { } protected void joinChatRoom ( IContainer container , IChatRoomInfo roomInfo , String password ) throws ECFException { } private void selectAndJoinChatRoomForAccounts ( MultiRosterAccount [ ] accounts ) { } private void makeActions ( ) { } protected void changePasswordForAccount ( MultiRosterAccount account ) { } protected void disconnectAccounts ( MultiRosterAccount [ ] accounts ) { } private MultiRosterAccount findAccountForUser ( ID userID ) { } private void sendPresence ( IPresence . Mode mode ) { } private void hookContextMenu ( ) { } private void fillContextMenu ( IMenuManager manager ) { } private IRosterEntry find ( Collection items , ID userID ) { } private MultiRosterAccount findAccountForContainer ( IContainer container ) { } private void remove ( IRosterEntry entry ) { } private void message ( IStructuredSelection iss ) { } private void contributeToActionBars ( ) { } private void setLocalPullDownEnabled ( boolean enabled ) { } private void fillLocalPullDown ( IMenuManager manager ) { } public void dispose ( ) { } protected boolean addRosterAccount ( MultiRosterAccount account ) { } protected void rosterAccountDisconnected ( MultiRosterAccount disconnectedAccount ) { } protected void removeRosterAccount ( MultiRosterAccount account ) { } public void setFocus ( ) { } protected void refreshTreeViewer ( Object val , boolean labels ) { } protected void addEntryToTreeViewer ( IRosterEntry entry ) { } protected void removeEntryFromTreeViewer ( IRosterEntry entry ) { } protected void removeEntryFromTreeViewer ( ID entryID ) { } public boolean addContainer ( IContainer container ) { } private class PresenceListener implements IPresenceListener { public void handlePresence ( ID fromID , IPresence presence ) { } } private class ViewerToolTip extends ToolTip { private Image image ; public ViewerToolTip ( Control control ) { } protected Composite createToolTipContentArea ( Event event , Composite parent ) { } public void deactivate ( ) { } private Image resize ( Image image1 , int width , int height ) { } private String getRosterEntryChildrenFromPresence ( IRosterEntry entry ) { } protected boolean shouldCreateToolTip ( Event e ) { } } class RoomWithAView { ChatRoomManagerView view ; ID secondaryID ; RoomWithAView ( ChatRoomManagerView view , ID secondaryID ) { } public ChatRoomManagerView getView ( ) { } public ID getID ( ) { } } }

Fix:
if ( target instanceof IRosterItem ) {