Buggy code:
public class PartTabFolder extends LayoutPart implements ILayoutContainer , IWorkbenchDragSource { private WorkbenchPage page ; private PaneContribution paneContribution ; private DefaultStackPresentationSite presentationSite = new DefaultStackPresentationSite ( ) { public void selectPart ( IPresentablePart toSelect ) { } public void setPresentation ( StackPresentation newPresentation ) { } public void setState ( int newState ) { } public void dragStart ( IPresentablePart beingDragged , Point initialLocation , boolean keyboard ) { } public void close ( IPresentablePart part ) { } public boolean isClosable ( IPresentablePart part ) { } public boolean isMovable ( IPresentablePart part ) { } } ; private LayoutPart current ; private LayoutPart inactiveCurrent ; private boolean active = false ; private int flags ; private List children = new ArrayList ( 3 ) ; public PartTabFolder ( WorkbenchPage page ) { } private IPresentablePart getCurrentPresentablePart ( ) { } private void presentationSelectionChanged ( IPresentablePart newSelection ) { } protected void close ( IPresentablePart part ) { } private LayoutPart getPaneFor ( IPresentablePart part ) { } public PartTabFolder ( WorkbenchPage page , int flags ) { } private void add ( LayoutPart newChild , int idx ) { } public void add ( LayoutPart child ) { } public boolean allowsBorder ( ) { } private LayoutPart getLayoutPart ( IPresentablePart toFind ) { } private IPresentablePart getPresentablePartAtIndex ( int idx ) { } private List getPresentableParts ( ) { } public void createControl ( Composite parent ) { if ( ( presentationSite . getPresentation ( ) ) != null ) return ; <START_BUG> presentationSite . setPresentation ( new org . eclipse . ui . internal . presentations . PartTabFolderPresentation ( parent , presentationSite , flags , page . getTheme ( ) ) ) ; <END_BUG> active = true ; Iterator iter = children . iterator ( ) ; while ( iter . hasNext ( ) ) { LayoutPart part = ( ( LayoutPart ) ( iter . next ( ) ) ) ; showPart ( part , null ) ; } if ( ( getItemCount ( ) ) > 0 ) { int newPage = 0 ; if ( ( current ) != null ) newPage = indexOf ( current ) ; setSelection ( newPage ) ; } Control ctrl = getPresentation ( ) . getControl ( ) ; DragUtil . addDragTarget ( ctrl , new IDragOverListener ( ) { public IDropTarget drag ( Control currentControl , final Object draggedObject , Point position , Rectangle dragRectangle ) { if ( ! ( draggedObject instanceof ViewPane ) ) { return null ; } final ViewPane pane = ( ( ViewPane ) ( draggedObject ) ) ; if ( ( pane . getWorkbenchWindow ( ) ) != ( getWorkbenchWindow ( ) ) ) { return null ; } final StackDropResult dropResult = getPresentation ( ) . dragOver ( currentControl , position ) ; if ( dropResult == null ) { return null ; } IPresentablePart draggedControl = getPresentablePartAtIndex ( dropResult . getDropIndex ( ) ) ; if ( draggedControl == ( pane . getPresentablePart ( ) ) ) { return null ; } return new IDropTarget ( ) { public void drop ( ) { if ( ( pane . getContainer ( ) ) != ( PartTabFolder . this ) ) { page . getActivePerspective ( ) . getPresentation ( ) . derefPart ( pane ) ; pane . reparent ( getParent ( ) ) ; } else { remove ( pane ) ; } add ( pane , dropResult . getDropIndex ( ) ) ; setSelection ( pane ) ; pane . setFocus ( ) ; } public Cursor getCursor ( ) { return DragCursors . getCursor ( CENTER ) ; } public Rectangle getSnapRectangle ( ) { return dropResult . getSnapRectangle ( ) ; } } ; } } ) ; ctrl . setData ( this ) ; } private void showPart ( LayoutPart part , IPresentablePart position ) { } public void dispose ( ) { } private StackPresentation getPresentation ( ) { } public void openTracker ( LayoutPart part ) { } public Rectangle getBounds ( ) { } public int getMinimumHeight ( ) { } public LayoutPart [ ] getChildren ( ) { } public Control getControl ( ) { } public int getItemCount ( ) { } public Composite getParent ( ) { } public int getSelection ( ) { } public LayoutPart getVisiblePart ( ) { } public int indexOf ( LayoutPart item ) { } private int indexOf ( IPresentablePart part ) { } public void remove ( LayoutPart child ) { } public void reparent ( Composite newParent ) { } public void replace ( LayoutPart oldChild , LayoutPart newChild ) { } public IStatus restoreState ( IMemento memento ) { } public IStatus saveState ( IMemento memento ) { } private void hidePart ( LayoutPart part ) { } public void setBounds ( Rectangle r ) { } public void setSelection ( int index ) { } private void setSelection ( LayoutPart part ) { } public void addDropTargets ( Collection result ) { } public int getType ( ) { } public boolean isDragAllowed ( Point point ) { } public LayoutPart targetPartFor ( IWorkbenchDragSource dragSource ) { } public void setActive ( boolean activeState ) { } public void showBusy ( PartPane partPane , boolean busy ) { } public void setContainer ( ILayoutContainer container ) { } private void setState ( int newState ) { } public void setZoomed ( boolean isZoomed ) { } private void updateControlBounds ( ) { } private void forceLayout ( ) { } public void findSashes ( LayoutPart part , ViewPane . Sashes sashes ) { } private void updateContainerVisibleTab ( ) { } public boolean resizesVertically ( ) { } public boolean allowsAutoFocus ( ) { } private void updateSystemMenu ( ) { } }

Fix:
presentationSite . setPresentation ( new org . eclipse . ui . internal . presentations . PartTabFolderPresentation ( parent , presentationSite , flags ) ) ;