Buggy code:
public void setState ( int newState ) { } public IPresentablePart getSelectedPart ( ) { } public void addSystemActions ( IMenuManager menuManager ) { } public boolean isStackMoveable ( ) { } public void flushLayout ( ) { } public IPresentablePart [ ] getPartList ( ) { } public String getProperty ( String id ) { } } ; private static final class PartStackDropResult extends AbstractDropTarget { private PartPane pane ; private StackDropResult dropResult ; private PartStack stack ; public void setTarget ( PartStack stack , PartPane pane , StackDropResult result ) { } public void drop ( ) { } public Cursor getCursor ( ) { } public Rectangle getSnapRectangle ( ) { } } private static final PartStack . PartStackDropResult dropResult = new PartStack . PartStackDropResult ( ) ; private boolean isMinimized ; private ListenerList listeners = new ListenerList ( ) ; private AbstractPresentationFactory factory ; protected abstract boolean isMoveable ( IPresentablePart part ) { } protected abstract void addSystemActions ( IMenuManager menuManager ) { } protected abstract boolean supportsState ( int newState ) { } protected abstract boolean canMoveFolder ( ) { } protected abstract void derefPart ( LayoutPart toDeref ) { } protected abstract boolean allowsDrop ( PartPane part ) { } protected static void appendToGroupIfPossible ( IMenuManager m , String groupId , ContributionItem item ) { } public PartStack ( int appearance ) { } public PartStack ( int appearance , AbstractPresentationFactory factory ) { } public void addListener ( IPropertyListener listener ) { } public void removeListener ( IPropertyListener listener ) { } protected final boolean isStandalone ( ) { } protected IPresentablePart getSelectedPart ( ) { } protected IStackPresentationSite getPresentationSite ( ) { } public void testInvariants ( ) { } public void describeLayout ( StringBuffer buf ) { } public void add ( LayoutPart child ) { } protected void add ( LayoutPart newChild , Object cookie ) { } public boolean allowsAdd ( LayoutPart toAdd ) { } public boolean allowsAutoFocus ( ) { } protected void close ( IPresentablePart [ ] parts ) { } protected void close ( IPresentablePart part ) { } public boolean isDisposed ( ) { } protected AbstractPresentationFactory getFactory ( ) { } public void createControl ( Composite parent ) { } public IDropTarget getDropTarget ( Object draggedObject , Point position ) { } public void setActive ( boolean isActive ) { } public void createControl ( Composite parent , StackPresentation presentation ) { } public IDropTarget createDropTarget ( PartPane pane , StackDropResult result ) { } protected void savePresentationState ( ) { } public void dispose ( ) { } public void findSashes ( LayoutPart part , PartPane . Sashes sashes ) { } public Rectangle getBounds ( ) { } public LayoutPart [ ] getChildren ( ) { } public Control getControl ( ) { } public int getItemCount ( ) { } protected LayoutPart getPaneFor ( IPresentablePart part ) { } public Composite getParent ( ) { } public List getPresentableParts ( ) { } private PresentablePart getPresentablePart ( LayoutPart pane ) { } protected StackPresentation getPresentation ( ) { } public PartPane getSelection ( ) { } private void presentationSelectionChanged ( IPresentablePart newSelection ) { } public void remove ( LayoutPart child ) { } public void reparent ( Composite newParent ) { } public void replace ( LayoutPart oldChild , LayoutPart newChild ) { } public int computePreferredSize ( boolean width , int availableParallel , int availablePerpendicular , int preferredParallel ) { } public int getSizeFlags ( boolean horizontal ) { } public IStatus restoreState ( IMemento memento ) { } public void setVisible ( boolean makeVisible ) { } public IStatus saveState ( IMemento memento ) { } protected WorkbenchPage getPage ( ) { } public void setActive ( int activeState ) { } public int getActive ( ) { } public void setBounds ( Rectangle r ) { } public void setSelection ( LayoutPart part ) { } protected abstract void updateActions ( PresentablePart current ) { } protected void handleDeferredEvents ( ) { } private void refreshPresentationSelection ( ) { } public int getState ( ) { } public void setMinimized ( boolean minimized ) { Perspective persp = getPage ( ) . getActivePerspective ( ) ; IPreferenceStore preferenceStore = PrefUtil . getAPIPreferenceStore ( ) ; boolean useNewMinMax = preferenceStore . getBoolean ( ENABLE_NEW_MIN_MAX ) ; <START_BUG> if ( ( minimized && useNewMinMax ) && ( ( this ) instanceof ViewStack ) ) { <END_BUG> List stacks = new ArrayList ( ) ; stacks . add ( this ) ; persp . movePartsToTrim ( stacks , false ) ; return ; } if ( minimized != ( isMinimized ) ) { isMinimized = minimized ; refreshPresentationState ( ) ; } } public boolean childObscuredByZoom ( LayoutPart toTest ) { } public void childRequestZoomIn ( LayoutPart toZoom ) { } public void childRequestZoomOut ( ) { } public boolean childIsZoomed ( LayoutPart toTest ) { } protected void setState ( int newState ) { } public void setZoomed ( boolean isZoomed ) { } public boolean isZoomed ( ) { } private void refreshPresentationState ( ) { } private void showPart ( LayoutPart part , Object cookie ) { } private void updateContainerVisibleTab ( ) { } public void showSystemMenu ( ) { } public void showPaneMenu ( ) { } public void showPartList ( ) { } public Control [ ] getTabList ( LayoutPart part ) { } private void dragStart ( IPresentablePart beingDragged , Point initialLocation , boolean keyboard ) { } public void paneDragStart ( LayoutPart pane , Point initialLocation , boolean keyboard ) { } public IMemento getSavedPresentationState ( ) { } private void fireInternalPropertyChange ( int id ) { } public void setPresentationState ( int newState ) { } public String getProperty ( String id ) { } public void setProperty ( String id , String value ) { } public void copyAppearanceProperties ( PartStack copyTo ) { } }

Fix:
if ( ( ( minimized && useNewMinMax ) && ( persp != null ) ) && ( ( this ) instanceof ViewStack ) ) {