Buggy code:
public abstract class PartSashContainer extends LayoutPart implements ILayoutContainer , IDragOverListener { protected Composite parent ; protected ControlListener resizeListener ; protected LayoutTree root ; protected LayoutTree unzoomRoot ; protected WorkbenchPage page ; boolean active = false ; protected ArrayList children = new ArrayList ( ) ; protected static class RelationshipInfo { protected LayoutPart part ; protected LayoutPart relative ; protected int relationship ; protected int left ; protected int right ; public float getRatio ( ) { } } private class SashContainerDropTarget extends AbstractDropTarget { private int side ; private int cursor ; private LayoutPart targetPart ; private LayoutPart sourcePart ; public SashContainerDropTarget ( LayoutPart sourcePart , int side , int cursor , LayoutPart targetPart ) { } public void drop ( ) { } public Cursor getCursor ( ) { } public Rectangle getSnapRectangle ( ) { } } public PartSashContainer ( String id , final WorkbenchPage page ) { } public void findSashes ( LayoutPart pane , PartPane . Sashes sashes ) { } public void add ( LayoutPart child ) { } void addEnhanced ( LayoutPart child , int swtDirectionConstant , float ratioForNewPart , LayoutPart relative ) { } public void add ( LayoutPart child , int relationship , float ratio , LayoutPart relative ) { } static int measureTree ( Rectangle outerBounds , LayoutTree toMeasure , boolean horizontal ) { } protected void addChild ( PartSashContainer . RelationshipInfo info ) { } void addChildForPlaceholder ( LayoutPart child , LayoutPart placeholder ) { } public boolean allowsBorder ( ) { } protected abstract void childAdded ( LayoutPart child ) { } protected abstract void childRemoved ( LayoutPart child ) { } public PartSashContainer . RelationshipInfo [ ] computeRelation ( ) { } public void createControl ( Composite parentWidget ) { } protected abstract Composite createParent ( Composite parentWidget ) { } public void dispose ( ) { if ( ! ( active ) ) return ; DragUtil . removeDragTarget ( parent , this ) ; DragUtil . removeDragTarget ( parent . getShell ( ) , this ) ; if ( ( ( resizeListener ) != null ) && ( ( parent ) != null ) ) { parent . removeControlListener ( resizeListener ) ; } resizeSashes ( new Rectangle ( ( - 200 ) , ( - 200 ) , 0 , 0 ) ) ; if ( ( children ) != null ) { for ( int i = 0 , length = children . size ( ) ; i < length ; i ++ ) { LayoutPart child = ( ( LayoutPart ) ( children . get ( i ) ) ) ; child . setContainer ( null ) ; <START_BUG> if ( child instanceof PartTabFolder ) <END_BUG> child . dispose ( ) ; } } disposeParent ( ) ; this . parent = null ; active = false ; } protected abstract void disposeParent ( ) { } public void disposeSashes ( ) { } public LayoutPart findBottomRight ( ) { } public Rectangle getBounds ( ) { } public int getMinimumHeight ( ) { } public int getMinimumWidth ( ) { } public LayoutPart [ ] getChildren ( ) { } public Control getControl ( ) { } public LayoutTree getLayoutTree ( ) { } public WorkbenchPage getPage ( ) { } public Composite getParent ( ) { } protected boolean isChild ( LayoutPart part ) { } private boolean isRelationshipCompatible ( int relationship , boolean isVertical ) { } public boolean isZoomed ( ) { } public void remove ( LayoutPart child ) { } public void replace ( LayoutPart oldChild , LayoutPart newChild ) { } private void resizeSashes ( Rectangle parentSize ) { } public void setBounds ( Rectangle r ) { } public void zoomIn ( LayoutPart part ) { } public void zoomOut ( ) { } public IDropTarget drag ( Control currentControl , Object draggedObject , Point position , Rectangle dragRectangle ) { } public abstract boolean isStackType ( LayoutPart toTest ) { } public abstract boolean isPaneType ( LayoutPart toTest ) { } protected void dropObject ( LayoutPart sourcePart , LayoutPart targetPart , int side ) { } protected abstract LayoutPart createStack ( LayoutPart sourcePart ) { } public void stack ( LayoutPart newPart , LayoutPart relPos ) { } protected abstract void setVisiblePart ( ILayoutContainer container , LayoutPart visiblePart ) { } protected abstract LayoutPart getVisiblePart ( ILayoutContainer container ) { } private void stackPane ( LayoutPart newPart , ILayoutContainer refPart ) { } protected void derefPart ( LayoutPart sourcePart ) { } protected int getVisibleChildrenCount ( ILayoutContainer container ) { } protected float getDockingRatio ( LayoutPart dragged , LayoutPart target ) { } public void describeLayout ( StringBuffer buf ) { } void add ( LayoutPart child , int relationship , int left , int right , LayoutPart relative ) { } }

Fix:
if ( child instanceof ViewStack )