Buggy code:
public static GameInformationFrame getGameInfo ( ) { } public static GameSettingFrame getGameSettings ( ) { } private LGM ( ) { } public static ImageIcon findIcon ( String filename ) { } public static ImageIcon getIconForKey ( String key ) { } public static JButton makeButton ( String key ) { } public static AbstractButton makeButton ( AbstractButton but , String key ) { } private static JToolBar createToolBar ( ) { } private static JComponent createTree ( ) { } private static JComponent createTree ( ResNode newroot ) { } public static ResNode newRoot ( ) { } private static JComponent createMDI ( ) { } public static void loadPlugins ( ) { } public static void populateTree ( ) { } public static void commitAll ( ) { } public static void reload ( boolean newRoot ) { } public static interface ReloadListener { void reloadPerformed ( boolean newRoot ) { } } protected static ArrayList < LGM . ReloadListener > reloadListeners = new ArrayList < LGM . ReloadListener > ( ) ; public static void addReloadListener ( LGM . ReloadListener l ) { } public static void removeReloadListener ( LGM . ReloadListener l ) { } protected static void fireReloadPerformed ( boolean newRoot ) { } public static void main ( String [ ] args ) { System . setProperty ( "sun.java2d.d3d" , "false" ) ; System . setProperty ( "apple.laf.useScreenMenuBar" , "true" ) ; UIManager . put ( "swing.boldMetal" , Boolean . FALSE ) ; System . out . format ( "Java<seq2seq4repair_space>Version:<seq2seq4repair_space>%d<seq2seq4repair_space>(%s)\n" , LGM . javaVersion , System . getProperty ( "java.version" ) ) ; if ( ( LGM . javaVersion ) < 10600 ) System . out . println ( "Some<seq2seq4repair_space>program<seq2seq4repair_space>functionality<seq2seq4repair_space>will<seq2seq4repair_space>be<seq2seq4repair_space>limited<seq2seq4repair_space>due<seq2seq4repair_space>to<seq2seq4repair_space>your<seq2seq4repair_space>outdated<seq2seq4repair_space>version" ) ; LGM . SplashProgress splashProgress = new LGM . SplashProgress ( ) ; splashProgress . start ( ) ; Util . tweakIIORegistry ( ) ; LGM . tempDir = new File ( System . getProperty ( "java.io.tmpdir" ) , "lgm" ) ; if ( ! ( LGM . tempDir . exists ( ) ) ) { LGM . tempDir . mkdir ( ) ; if ( ( LGM . javaVersion ) >= 10600 ) { LGM . tempDir . setReadable ( true , false ) ; LGM . tempDir . setWritable ( true , false ) ; } } splashProgress . progress ( 20 , Messages . getString ( "LGM.SPLASH_LIBS" ) ) ; LibManager . autoLoad ( ) ; splashProgress . progress ( 30 , Messages . getString ( "LGM.SPLASH_TOOLS" ) ) ; JComponent toolbar = LGM . createToolBar ( ) ; JComponent left = LGM . createTree ( ) ; JComponent right = LGM . createMDI ( ) ; JSplitPane split = new JSplitPane ( JSplitPane . HORIZONTAL_SPLIT , true , left , right ) ; split . setDividerLocation ( 170 ) ; split . setOneTouchExpandable ( true ) ; splashProgress . progress ( 40 , Messages . getString ( "LGM.SPLASH_THREAD" ) ) ; LGM . gameInformationFrameBuilder = new Thread ( ) { public void run ( ) { LGM . gameInfo = new GameInformationFrame ( LGM . currentFile . gameInfo ) ; LGM . mdi . add ( LGM . gameInfo ) ; } } ; LGM . gameSettingFrameBuilder = new Thread ( ) { public void run ( ) { LGM . gameSet = new GameSettingFrame ( LGM . currentFile . gameSettings , LGM . currentFile . constants , LGM . currentFile . includes ) ; LGM . mdi . add ( LGM . gameSet ) ; } } ; LGM . gameInformationFrameBuilder . start ( ) ; LGM . gameSettingFrameBuilder . start ( ) ; splashProgress . progress ( 50 , Messages . getString ( "LGM.SPLASH_MENU" ) ) ; LGM . frame = new JFrame ( Messages . format ( "LGM.TITLE" , Messages . getString ( "LGM.NEWGAME" ) ) ) ; LGM . frame . setJMenuBar ( new GmMenuBar ( ) ) ; splashProgress . progress ( 60 , Messages . getString ( "LGM.SPLASH_UI" ) ) ; JPanel f = new JPanel ( new BorderLayout ( ) ) ; <START_BUG> LGM . frame . setDefaultCloseOperation ( JFrame . DISPOSE_ON_CLOSE ) ; <END_BUG> LGM . frame . setContentPane ( f ) ; LGM . frame . setTransferHandler ( Listener . getInstance ( ) . fc . new LGMDropHandler ( ) ) ; f . add ( BorderLayout . NORTH , toolbar ) ; f . add ( BorderLayout . CENTER , split ) ; f . add ( BorderLayout . EAST , ( LGM . eventSelect = new EventPanel ( ) ) ) ; LGM . eventSelect . setVisible ( false ) ; f . setOpaque ( true ) ; new FramePrefsHandler ( LGM . frame ) ; splashProgress . progress ( 70 , Messages . getString ( "LGM.SPLASH_LOGO" ) ) ; try { LGM . frame . setIconImage ( ImageIO . read ( LGM . class . getClassLoader ( ) . getResource ( "org//lateralgm//main//lgm-logo.png" ) ) ) ; } catch ( Exception e ) { e . printStackTrace ( ) ; } splashProgress . progress ( 80 , Messages . getString ( "LGM.SPLASH_TREE" ) ) ; LGM . populateTree ( ) ; splashProgress . progress ( 90 , Messages . getString ( "LGM.SPLASH_PLUGINS" ) ) ; LGM . loadPlugins ( ) ; if ( ( args . length ) != 0 ) { splashProgress . progress ( 95 , Messages . getString ( "LGM.SPLASH_PRELOAD" ) ) ; try { Listener . getInstance ( ) . fc . open ( new URI ( args [ 0 ] ) ) ; } catch ( URISyntaxException e ) { e . printStackTrace ( ) ; } } splashProgress . complete ( ) ; LGM . frame . setVisible ( true ) ; } static final class SplashProgress { final SplashScreen splash ; final Graphics2D splashGraphics ; final JProgressBar bar ; final Graphics barGraphics ; private String text = null ;

Fix:
LGM . frame . setDefaultCloseOperation ( JFrame . EXIT_ON_CLOSE ) ;