Buggy code:
} } catch ( SecurityException s ) { threadReturn [ 0 ] = SplashScreen . ReturnType . MKDIR_READ_ERROR ; return ; } dequeueTask ( ) ; try { if ( ! ( configGzFile . exists ( ) ) ) { threadReturn [ 0 ] = SplashScreen . ReturnType . WRITE_ERROR ; return ; } } catch ( SecurityException s ) { threadReturn [ 0 ] = SplashScreen . ReturnType . READ_ERROR ; return ; } if ( ( WorkbenchManager . getPrimitiveCache ( ) ) == null ) { WorkbenchManager . setPrimitiveCache ( new PrimitiveCache ( ) ) ; } HashMap < String , PGData > pcache = WorkbenchManager . getPrimitiveCache ( ) . getPrimitiveCache ( ) ; if ( pcache != null ) { CompositePrimitive . setCache ( pcache ) ; } HashMap < PGTimestamp , ArrayList < String > > pfcache = WorkbenchManager . getPrimitiveCache ( ) . getPrimitiveFileCache ( ) ; if ( pfcache != null ) { CompositePrimitive . setFileCache ( pfcache ) ; } UTF8BufferedReader reader ; String line = null ; try { ArrayList < ToolItemState > states = WorkbenchManager . getUserSettingState ( ) . getToolItemConfig3D ( ) ; if ( states == null ) { states = new ArrayList < ToolItemState > ( ) ; WorkbenchManager . getUserSettingState ( ) . setToolItemConfig3D ( states ) ; } reader = new UTF8BufferedReader ( "layout_3D_editor.cfg" ) ; states . clear ( ) ; while ( true ) { line = reader . readLine ( ) ; if ( line == null ) { break ; } final String [ ] data_segments = Pattern . compile ( ";" ) . split ( line . trim ( ) ) ; if ( ( data_segments . length ) > 3 ) { for ( int i = 0 ; i < 4 ; i ++ ) { data_segments [ i ] = data_segments [ i ] . trim ( ) ; } ToolItemDrawMode mode = ToolItemDrawMode . HORIZONTAL ; ToolItemDrawLocation location = ToolItemDrawLocation . NORTH ; if ( "EAST" . equals ( data_segments [ 1 ] ) ) { location = ToolItemDrawLocation . EAST ; } else if ( "WEST" . equals ( data_segments [ 1 ] ) ) { location = ToolItemDrawLocation . WEST ; } if ( "VERTICAL" . equals ( data_segments [ 2 ] ) ) { mode = ToolItemDrawMode . VERTICAL ; } else if ( "DROPDWNMNU" . equals ( data_segments [ 2 ] ) ) { mode = ToolItemDrawMode . DROP_DOWN ; } if ( "NO_LABEL" . equals ( data_segments [ 3 ] ) ) { data_segments [ 3 ] = "" ; } states . add ( new ToolItemState ( data_segments [ 0 ] , location , mode , data_segments [ 3 ] ) ) ; } } reader . close ( ) ; } catch ( FileNotFoundException consumed ) { } catch ( LDParsingException e1 ) { NLogger . error ( getClass ( ) , e1 ) ; } catch ( UnsupportedEncodingException e1 ) { NLogger . error ( getClass ( ) , e1 ) ; } display . syncExec ( new Runnable ( ) { @ Override public void run ( ) { ProgressHelper . finishQueue ( bar , label ) ; } } ) ; threadReturn [ 0 ] = SplashScreen . ReturnType . NO_ERROR ; this . interrupt ( ) ; } } . start ( ) ; while ( ( threadReturn [ 0 ] ) == null ) { display . readAndDispatch ( ) ; } try { Thread . sleep ( 1000 ) ; } catch ( InterruptedException e ) { } close ( ) ; while ( ! ( bar . isDisposed ( ) ) ) { if ( ! ( Display . getCurrent ( ) . readAndDispatch ( ) ) ) { Display . getCurrent ( ) . sleep ( ) ; } } ResourceManager . disposeImage ( "imgSplash.png" ) ; if ( ( threadReturn [ 0 ] ) != ( SplashScreen . ReturnType . NO_ERROR ) ) { MessageBox messageBox = new MessageBox ( new Shell ( ) , SWT . ICON_ERROR ) ; switch ( threadReturn [ 0 ] ) { case MKDIR_READ_ERROR : messageBox . setText ( DIALOG_Error ) ; messageBox . setMessage ( SPLASH_NoMkDirNoRead ) ; break ; case WRITE_ERROR : messageBox . setText ( DIALOG_Error ) ; messageBox . setMessage ( SPLASH_NoWrite ) ; break ; case READ_ERROR : messageBox . setText ( DIALOG_Error ) ; messageBox . setMessage ( SPLASH_NoRead ) ; break ; case OPENGL_ERROR : messageBox . setText ( DIALOG_Error ) ; messageBox . setMessage ( SPLASH_InvalidOpenGLVersion ) ; break ; case NO_ERROR : break ; } messageBox . open ( ) ; ResourceManager . dispose ( ) ; Display . getCurrent ( ) . dispose ( ) ; } else { try { File projectFolder = new File ( "project" ) ; if ( projectFolder . exists ( ) ) { FileHelper . deleteDirectory ( projectFolder ) ; } projectFolder . mkdir ( ) ; } catch ( SecurityException consumed ) { } String ldcPath = WorkbenchManager . getUserSettingState ( ) . getLdConfigPath ( ) ; if ( ldcPath == null ) { ldcPath = ( ( WorkbenchManager . getUserSettingState ( ) . getLdrawFolderPath ( ) ) + ( File . separator ) ) + "LDConfig.ldr" ; } View . loadLDConfig ( ldcPath ) ; if ( NLogger . DEBUG ) { <START_BUG> DatFile fileToEdit = new DatFile ( ( ( ( ( ( Project . getProjectPath ( ) ) + ( File . separator ) ) + "PARTS" ) + ( File . separator ) ) + "new.dat" ) ) ; <END_BUG> Project . setFileToEdit ( fileToEdit ) ; } new Editor3DWindow ( ) . run ( ) ; } } @ Override protected Control createContents ( final Composite parent ) { } private void dequeueTask ( ) { } }

Fix:
DatFile fileToEdit = new DatFile ( ( ( ( ( ( Project . getProjectPath ( ) ) + ( File . separator ) ) + "parts" ) + ( File . separator ) ) + "new.dat" ) ) ;