Buggy code:
public class PageLayout implements IPageLayout { private ArrayList actionSets = new ArrayList ( 3 ) ; private IPerspectiveDescriptor descriptor ; private LayoutPart editorFolder ; private boolean editorVisible = true ; private boolean fixed ; private ArrayList fastViews = new ArrayList ( 3 ) ; private Map mapIDtoFolder = new HashMap ( 10 ) ; private Map mapIDtoPart = new HashMap ( 10 ) ; private Map mapIDtoViewLayoutRec = new HashMap ( 10 ) ; private ArrayList newWizardShortcuts = new ArrayList ( 3 ) ; private ArrayList perspectiveShortcuts = new ArrayList ( 3 ) ; private ViewSashContainer rootLayoutContainer ; private ArrayList showInPartIds = new ArrayList ( 3 ) ; private ArrayList showViewShortcuts = new ArrayList ( 3 ) ; private ViewFactory viewFactory ; public PageLayout ( ) { } public PageLayout ( ViewSashContainer container , ViewFactory viewFactory , LayoutPart editorFolder , IPerspectiveDescriptor descriptor ) { } private void addEditorArea ( ) { } public void addActionSet ( String actionSetID ) { } public void addFastView ( String id ) { } public void addFastView ( String id , float ratio ) { } private boolean isFastViewId ( String partId ) { } ViewLayoutRec getViewLayoutRec ( String id , boolean create ) { } public void addNewWizardShortcut ( String id ) { } private void addPart ( LayoutPart newPart , String partId , int relationship , float ratio , String refId ) { } public void addPerspectiveShortcut ( String id ) { } public void addPlaceholder ( String viewId , int relationship , float ratio , String refId ) { } boolean checkValidPlaceholderId ( String id ) { } public void addShowInPart ( String id ) { } public void addShowViewShortcut ( String id ) { } public void addView ( String viewId , int relationship , float ratio , String refId ) { } private void addView ( String viewId , int relationship , float ratio , String refId , boolean standalone , boolean showTitle ) { if ( checkPartInLayout ( viewId ) ) return ; try { LayoutPart newPart = createView ( viewId ) ; if ( newPart == null ) { addPlaceholder ( viewId , relationship , ratio , refId ) ; LayoutHelper . addViewActivator ( this , viewId ) ; } else { int appearance = PresentationFactoryUtil . ROLE_VIEW ; if ( standalone ) { if ( showTitle ) { appearance = PresentationFactoryUtil . ROLE_STANDALONE ; } else { appearance = PresentationFactoryUtil . ROLE_STANDALONE_NOTITLE ; } } <START_BUG> ViewStack newFolder = new ViewStack ( rootLayoutContainer . page , true , appearance ) ; <END_BUG> newFolder . add ( newPart ) ; setFolderPart ( viewId , newFolder ) ; addPart ( newFolder , viewId , relationship , ratio , refId ) ; getViewLayoutRec ( viewId , true ) ; } } catch ( PartInitException e ) { WorkbenchPlugin . log ( getClass ( ) , "addView" , e ) ; } } boolean checkPartInLayout ( String partId ) { } public IFolderLayout createFolder ( String folderId , int relationship , float ratio , String refId ) { } public IPlaceholderFolderLayout createPlaceholderFolder ( String folderId , int relationship , float ratio , String refId ) { } private LayoutPart createView ( String partID ) throws PartInitException { } public ArrayList getActionSets ( ) { } public IPerspectiveDescriptor getDescriptor ( ) { } public String getEditorArea ( ) { } public int getEditorReuseThreshold ( ) { } public ArrayList getFastViews ( ) { } private ViewStack getFolderPart ( String viewId ) { } public ArrayList getNewWizardShortcuts ( ) { } private int getPartSashConst ( int nRelationship ) { } public ArrayList getPerspectiveShortcuts ( ) { } LayoutPart getRefPart ( String partID ) { } public ViewSashContainer getRootLayoutContainer ( ) { } public ArrayList getShowInPartIds ( ) { } public ArrayList getShowViewShortcuts ( ) { } ViewFactory getViewFactory ( ) { } public boolean isEditorAreaVisible ( ) { } private float normalizeRatio ( float in ) { } private void prefill ( ) { } public void setEditorAreaVisible ( boolean showEditorArea ) { } public void setEditorReuseThreshold ( int openEditors ) { } public void setFixed ( boolean fixed ) { } public boolean isFixed ( ) { } void setFolderPart ( String viewId , ContainerPlaceholder container ) { } void setFolderPart ( String viewId , ViewStack folder ) { } void setRefPart ( String partID , LayoutPart part ) { } private void stackPart ( LayoutPart newPart , String viewId , String refId ) { } public void stackPlaceholder ( String viewId , String refId ) { } public void stackView ( String viewId , String refId ) { } public static int swtConstantToLayoutPosition ( int swtConstant ) { } public void addStandaloneView ( String viewId , boolean showTitle , int relationship , float ratio , String refId ) { } public IViewLayout getViewLayout ( String viewId ) { } public Map getIDtoViewLayoutRecMap ( ) { } }

Fix:
ViewStack newFolder = new ViewStack ( rootLayoutContainer . page , true , appearance , null ) ;