Buggy code:
public class PerspectiveSwitcher { private WorkbenchWindow window ; private CBanner topBar ; private int style ; private Composite parent ; private Composite trimControl ; private Label trimSeparator ; private GridData trimLayoutData ; private boolean trimVisible = false ; private int trimOldLength = 0 ; private PerspectiveBarManager perspectiveBar ; private CoolBar perspectiveCoolBar ; private CacheWrapper perspectiveCoolBarWrapper ; private CoolItem coolItem ; private CacheWrapper toolbarWrapper ; private Menu popupMenu ; private Menu genericMenu ; private static final int INITIAL = - 1 ; private static final int TOP_RIGHT = 1 ; private static final int TOP_LEFT = 2 ; private static final int LEFT = 3 ; private static final int DEFAULT_RIGHT_X = 160 ; private int currentLocation = PerspectiveSwitcher . INITIAL ; private static final int SEPARATOR_LENGTH = 20 ; private IPreferenceStore apiPreferenceStore = PrefUtil . getAPIPreferenceStore ( ) ; private IPropertyChangeListener propertyChangeListener ; private Listener popupListener = new Listener ( ) { public void handleEvent ( Event event ) { } } ; private Listener dragListener ; private IDragOverListener dragTarget ; private IDragOverListener externalDragTarget ; private DisposeListener toolBarListener ; public PerspectiveSwitcher ( WorkbenchWindow window , CBanner topBar , int style ) { } private static int convertLocation ( String preference ) { } public void createControl ( Composite parent ) { } public void addPerspectiveShortcut ( IPerspectiveDescriptor perspective , WorkbenchPage workbenchPage ) { } public IContributionItem findPerspectiveShortcut ( IPerspectiveDescriptor perspective , WorkbenchPage page ) { } public void removePerspectiveShortcut ( IPerspectiveDescriptor perspective , WorkbenchPage page ) { } public void setPerspectiveBarLocation ( String preference ) { } private void showPerspectiveBar ( ) { } public void update ( boolean force ) { } public void selectPerspectiveShortcut ( IPerspectiveDescriptor perspective , WorkbenchPage page , boolean selected ) { } public void updatePerspectiveShortcut ( IPerspectiveDescriptor oldDesc , IPerspectiveDescriptor newDesc , WorkbenchPage page ) { } public PerspectiveBarManager getPerspectiveBar ( ) { } public void dispose ( ) { } private void disposeChildControls ( ) { } private void createControlForLocation ( int newLocation ) { } private void unhookDragSupport ( ) { ToolBar bar = perspectiveBar . getControl ( ) ; <START_BUG> if ( ( ( bar != null ) || ( ! ( bar . isDisposed ( ) ) ) ) || ( ( dragListener ) == null ) ) <END_BUG> return ; PresentationUtil . removeDragListener ( bar , dragListener ) ; DragUtil . removeDragTarget ( perspectiveBar . getControl ( ) , dragTarget ) ; DragUtil . removeDragTarget ( null , externalDragTarget ) ; dragListener = null ; dragTarget = null ; externalDragTarget = null ; } private void hookDragSupport ( ) { } private void setPropertyChangeListener ( ) { } private void createControlForLeft ( ) { } private void createControlForTop ( ) { } private void setCoolItemSize ( final CoolItem coolItem ) { } private void showPerspectiveBarPopup ( Point pt ) { } private PerspectiveBarManager createBarManager ( int direction ) { } private void updateLocationItems ( Menu parent , int newLocation ) { } private void addDockOnSubMenu ( Menu menu ) { } private void addShowTextItem ( Menu menu ) { } public void saveState ( IMemento persBarMem ) { } public void restoreState ( IMemento memento ) { } void updatePerspectiveBar ( ) { } public void updateBarParent ( ) { } }

Fix:
if ( ( ( bar == null ) || ( bar . isDisposed ( ) ) ) || ( ( dragListener ) == null ) )