Buggy code:
public class WorkbenchWindow extends ApplicationWindow implements IWorkbenchWindow { private int number ; private WorkbenchWindow . PageList pageList = new WorkbenchWindow . PageList ( ) ; private PageListenerList pageListeners = new PageListenerList ( ) ; private PerspectiveListenerListOld perspectiveListeners = new PerspectiveListenerListOld ( ) ; private WWinPerspectiveService perspectiveService = new WWinPerspectiveService ( this ) ; private WWinPartService partService = new WWinPartService ( this ) ; private ActionPresentation actionPresentation ; private WWinActionBars actionBars ; private boolean updateDisabled = true ; private boolean closing = false ; private boolean shellActivated = false ; private FastViewBar fastViewBar ; private PerspectiveBarManager perspectiveBar ; private Menu perspectiveBarMenu ; private TrimLayout layout = new TrimLayout ( ) ; AnimationItem animationItem ; private Label noOpenPerspective ; private Rectangle normalBounds ; private boolean asMaximizedState = false ; private CBanner topBar ; private int submenus = 0 ; private WorkbenchWindowConfigurer windowConfigurer = null ; static final String GRP_PAGES = "pages" ; static final String GRP_PERSPECTIVES = "perspectives" ; static final String GRP_FAST_VIEWS = "fastViews" ; static final int VGAP = 0 ; static final int CLIENT_INSET = 3 ; static final int BAR_SIZE = 23 ; public static final int SHOW_VIEW_SUBMENU = 1 ; public static final int OPEN_PERSPECTIVE_SUBMENU = 2 ; public static final int NEW_WIZARD_SUBMENU = 4 ; public void addSubmenu ( int type ) { } public boolean containsSubmenu ( int type ) { } private static final int FILL_ALL_ACTION_BARS = ( ( WorkbenchAdvisor . FILL_MENU_BAR ) | ( WorkbenchAdvisor . FILL_COOL_BAR ) ) | ( WorkbenchAdvisor . FILL_STATUS_LINE ) ; public WorkbenchWindow ( int number ) { } protected int perspectiveBarStyle ( ) { } private Map actionSetHandlersByCommandId = new HashMap ( ) ; private Map globalActionHandlersByCommandId = new HashMap ( ) ; public IMutableCommandHandlerService actionSetAndGlobalActionCommandHandlerService = CommandHandlerServiceFactory . getMutableCommandHandlerService ( ) ; private TrimDropTarget trimDropTarget ; void registerActionSets ( IActionSet [ ] actionSets ) { } void registerGlobalAction ( IAction globalAction ) { } void setHandlersByCommandId ( ) { } public void addPageListener ( IPageListener l ) { } public void addPerspectiveListener ( org . eclipse . ui . IPerspectiveListener l ) { } void addPerspectiveShortcut ( IPerspectiveDescriptor perspective , WorkbenchPage workbenchPage ) { } protected void addPerspectiveBar ( int style ) { } private boolean busyClose ( ) { } protected IWorkbenchPage busyOpenPage ( String perspID , IAdaptable input ) throws WorkbenchException { } public int open ( ) { } protected boolean canHandleShellCloseEvent ( ) { } public boolean close ( ) { } protected boolean isClosing ( ) { } protected boolean isCoolBarLocked ( ) { } private void closeAllPages ( ) { } public void closeAllPages ( boolean save ) { } protected boolean closePage ( IWorkbenchPage in , boolean save ) { } private void showEmptyWindowMessage ( ) { } protected void configureShell ( Shell shell ) { } protected void createTrimWidgets ( Shell parent ) { topBar = new CBanner ( parent , SWT . NONE ) ; FormLayout topLayout = new FormLayout ( ) ; topBar . setLayout ( topLayout ) ; createCoolBarControl ( topBar ) ; createPerspectiveBar ( topBar ) ; perspectiveBar . setBanner ( topBar ) ; topBar . setLeft ( getCoolBarControl ( ) ) ; topBar . setRight ( perspectiveBar . getControl ( ) ) ; ColorSchemeService . setCoolBarColors ( getCoolBarControl ( ) ) ; ColorSchemeService . setPerspectiveToolBarColors ( perspectiveBar . getControl ( ) ) ; createStatusLine ( parent ) ; fastViewBar . createControl ( parent ) ; addPerspectiveListener ( new IPerspectiveListener ( ) { public void perspectiveActivated ( IWorkbenchPage page , IPerspectiveDescriptor perspective ) { fastViewBar . update ( true ) ; } public void perspectiveChanged ( IWorkbenchPage page , IPerspectiveDescriptor perspective , String changeId ) { fastViewBar . update ( true ) ; } } ) ; <START_BUG> trimDropTarget = new TrimDropTarget ( parent ) ; <END_BUG> DragUtil . addDragTarget ( parent , trimDropTarget ) ; createProgressIndicator ( parent ) ; } private void createPerspectiveBar ( Composite parent ) { } IContributionItem findPerspectiveShortcut ( IPerspectiveDescriptor perspective , WorkbenchPage page ) { } private void firePageActivated ( IWorkbenchPage page ) { } private void firePageClosed ( IWorkbenchPage page ) { } private void firePageOpened ( IWorkbenchPage page ) { } void firePerspectiveActivated ( IWorkbenchPage page , IPerspectiveDescriptor perspective ) { } void firePerspectiveChanged ( IWorkbenchPage page , IPerspectiveDescriptor perspective , String changeId ) { } void firePerspectiveClosed ( IWorkbenchPage page , IPerspectiveDescriptor perspective ) { } void firePerspectiveOpened ( IWorkbenchPage page , IPerspectiveDescriptor perspective ) { } public WWinActionBars getActionBars ( ) { } public IWorkbenchPage getActivePage ( ) { } WorkbenchPage getActiveWorkbenchPage ( ) { } protected Composite getClientComposite ( ) { } public MenuManager getMenuManager ( ) { } public int getNumber ( ) { } public IWorkbenchPage [ ] getPages ( ) { } public IPartService getPartService ( ) { } protected Layout getLayout ( ) { } public IPerspectiveService getPerspectiveService ( ) { } public ISelectionService getSelectionService ( ) { } public boolean getShellActivated ( ) { } public StatusLineManager getStatusLineManager ( ) { } public IWorkbench getWorkbench ( ) { } public String getToolbarLabel ( String actionSetId ) { } private boolean hardClose ( ) { } public boolean isApplicationMenu ( String menuID ) { } boolean isWorkbenchCoolItemId ( String id ) { } void lockCoolBar ( boolean lock ) { } public boolean okToClose ( ) { } public IWorkbenchPage openPage ( final String perspId , final IAdaptable input ) throws WorkbenchException { } public IWorkbenchPage openPage ( IAdaptable input ) throws WorkbenchException { } public void removePageListener ( IPageListener l ) { } public void removePerspectiveListener ( org . eclipse . ui . IPerspectiveListener l ) { } void removePerspectiveShortcut ( IPerspectiveDescriptor perspective , WorkbenchPage page ) { } private IStatus unableToRestorePage ( IMemento pageMem ) { } public IStatus restoreState ( IMemento memento , IPerspectiveDescriptor activeDescriptor ) { } private boolean restoreOldCoolBar ( IMemento coolbarMem ) { } private boolean readLayout ( IMemento memento , ArrayList itemIds , ArrayList wrapIndicies ) { }

Fix:
trimDropTarget = new TrimDropTarget ( parent , this ) ;