Program: 49929
Project: 49929
Buggy source:
/** 
 * Initialize components of the GUI Create all the GUI components, set their specific properties and add them to the window. Also add any necessary ActionListeners.
 */
private void initComponents(){
  setTitle("String_Node_Str");
  setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
  setSize(325,340);
  setResizable(false);
  setLocationRelativeTo(null);
  setResizable(false);
  setLayout(new FlowLayout());
  setResizable(true);
  try {
    UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
  }
 catch (  Exception e) {
  }
  mainPanel=new JPanel();
  mainPanel.setBorder(BorderFactory.createLoweredBevelBorder());
  BufferedImage temp=null;
  try {
    temp=ImageIO.read(getClass().getResource("String_Node_Str"));
  }
 catch (  IOException e1) {
    e1.printStackTrace();
  }
  ImageIcon picture=new ImageIcon(temp);
  JLabel pictureHolder=new JLabel();
  picture.setImage(picture.getImage().getScaledInstance(300,200,Image.SCALE_SMOOTH));
  pictureHolder.setIcon(picture);
  newGame=new JButton("String_Node_Str");
  newGame.setToolTipText("String_Node_Str");
  newGame.addActionListener(new ActionListener(){
    @Override public void actionPerformed(    ActionEvent e){
      remove(mainPanel);
      otherPanel=new NewGameMenu();
      setPanel(otherPanel);
      pack();
    }
  }
);
  continueGame=new JButton("String_Node_Str");
  continueGame.setToolTipText("String_Node_Str");
  continueGame.addActionListener(new ActionListener(){
    @Override public void actionPerformed(    ActionEvent arg0){
      try {
        String[] files=FileUtility.getGamesInProgressFileArray();
        if (files == null) {
          JOptionPane.showMessageDialog(null,"String_Node_Str","String_Node_Str",JOptionPane.ERROR_MESSAGE);
          return;
        }
        String choice=(String)JOptionPane.showInputDialog(Driver.getInstance(),"String_Node_Str","String_Node_Str",JOptionPane.PLAIN_MESSAGE,null,files,null);
        if (choice == null)         return;
        FileInputStream f_in=new FileInputStream(FileUtility.getGamesInProgressFile(choice));
        ObjectInputStream obj_in=new ObjectInputStream(f_in);
        Game toPlay=(Game)obj_in.readObject();
        if (gameOptions != null)         gameOptions.setVisible(true);
        remove(mainPanel);
        otherPanel=new PlayGame(toPlay,false);
        setPanel(otherPanel);
        pack();
      }
 catch (      Exception e) {
        e.printStackTrace();
        JOptionPane.showMessageDialog(null,"String_Node_Str","String_Node_Str",JOptionPane.ERROR_MESSAGE);
      }
    }
  }
);
  viewGame=new JButton("String_Node_Str");
  viewGame.setToolTipText("String_Node_Str");
  viewGame.addActionListener(new ActionListener(){
    @Override public void actionPerformed(    ActionEvent arg0){
      try {
        String[] files=FileUtility.getCompletedGamesFileArray();
        if (files == null) {
          JOptionPane.showMessageDialog(null,"String_Node_Str","String_Node_Str",JOptionPane.ERROR_MESSAGE);
          return;
        }
        String choice=(String)JOptionPane.showInputDialog(Driver.getInstance(),"String_Node_Str","String_Node_Str",JOptionPane.PLAIN_MESSAGE,null,files,null);
        if (choice == null)         return;
        File file=FileUtility.getCompletedGamesFile(choice);
        Game toView;
        if (choice.endsWith("String_Node_Str")) {
          try {
            otherPanel=new PlayGame(true,file);
          }
 catch (          Exception e) {
            JOptionPane.showMessageDialog(null,"String_Node_Str");
            return;
          }
        }
 else {
          FileInputStream f_in=new FileInputStream(file);
          ObjectInputStream obj_in=new ObjectInputStream(f_in);
          toView=(Game)obj_in.readObject();
          otherPanel=new PlayGame(toView,true);
        }
        remove(mainPanel);
        setPanel(otherPanel);
        pack();
      }
 catch (      Exception e) {
        e.printStackTrace();
        JOptionPane.showMessageDialog(null,"String_Node_Str","String_Node_Str",JOptionPane.ERROR_MESSAGE);
      }
    }
  }
);
  createType=new JButton("String_Node_Str");
  createType.setToolTipText("String_Node_Str");
  createType.addActionListener(new ActionListener(){
    @Override public void actionPerformed(    ActionEvent e){
      remove(mainPanel);
      otherPanel=new NewTypeMenu();
      setPanel(otherPanel);
      pack();
    }
  }
);
  menuBar=new JMenuBar();
  fileMenu=new JMenu("String_Node_Str");
  fileMenu.setMnemonic('F');
  helpMenu=new JMenu("String_Node_Str");
  helpMenu.setMnemonic('H');
  final JFrame help=setUpHelp();
  final JFrame about=setUpAbout();
  JMenuItem helpMenuItem=new JMenuItem("String_Node_Str",KeyEvent.VK_H);
  helpMenuItem.setToolTipText("String_Node_Str");
  helpMenuItem.addActionListener(new ActionListener(){
    @Override public void actionPerformed(    ActionEvent e){
      help.setVisible(true);
    }
  }
);
  helpMenu.add(helpMenuItem);
  JMenuItem aboutItem=new JMenuItem("String_Node_Str",KeyEvent.VK_A);
  aboutItem.setToolTipText("String_Node_Str");
  aboutItem.addActionListener(new ActionListener(){
    @Override public void actionPerformed(    ActionEvent e){
      about.setVisible(true);
    }
  }
);
  helpMenu.add(aboutItem);
  JMenuItem newGameItem=new JMenuItem("String_Node_Str",KeyEvent.VK_N);
  newGameItem.setToolTipText("String_Node_Str");
  newGameItem.addActionListener(new ActionListener(){
    @Override public void actionPerformed(    ActionEvent e){
      remove(mainPanel);
      otherPanel=new NewGameMenu();
      setPanel(otherPanel);
      pack();
    }
  }
);
  fileMenu.add(newGameItem);
  mainMenu=new JMenuItem("String_Node_Str",KeyEvent.VK_M);
  mainMenu.setToolTipText("String_Node_Str");
  mainMenu.addActionListener(new ActionListener(){
    @Override public void actionPerformed(    ActionEvent arg0){
      if (gameOptions != null)       gameOptions.setVisible(false);
      if (otherPanel != null)       remove(otherPanel);
      ChessTimer.stopTimers();
      add(mainPanel);
      pack();
    }
  }
);
  mainMenu.setVisible(false);
  fileMenu.add(mainMenu);
  JMenuItem exitMenuItem=new JMenuItem("String_Node_Str",KeyEvent.VK_Q);
  exitMenuItem.setToolTipText("String_Node_Str");
  exitMenuItem.addActionListener(new ActionListener(){
    @Override public void actionPerformed(    ActionEvent e){
      int answer=JOptionPane.showConfirmDialog(null,"String_Node_Str","String_Node_Str",JOptionPane.YES_NO_OPTION);
      if (answer == 0)       System.exit(0);
    }
  }
);
  fileMenu.add(exitMenuItem);
  menuBar.add(fileMenu);
  menuBar.add(helpMenu);
  setJMenuBar(menuBar);
  mainPanel.setLayout(new GridBagLayout());
  GridBagConstraints c=new GridBagConstraints();
  c.fill=GridBagConstraints.HORIZONTAL;
  c.weightx=0.0;
  c.gridwidth=3;
  c.gridx=0;
  c.gridy=0;
  mainPanel.add(pictureHolder,c);
  c.fill=GridBagConstraints.HORIZONTAL;
  c.gridx=0;
  c.gridy=1;
  c.gridwidth=2;
  mainPanel.add(newGame,c);
  c.gridx=2;
  c.gridy=1;
  c.gridwidth=1;
  mainPanel.add(createType,c);
  c.fill=GridBagConstraints.HORIZONTAL;
  c.gridx=0;
  c.gridy=2;
  c.gridwidth=2;
  mainPanel.add(continueGame,c);
  c.gridx=2;
  c.gridy=2;
  c.gridwidth=1;
  mainPanel.add(viewGame,c);
  add(mainPanel);
  setVisible(true);
}

Fixed version (ground truth):
/** 
 * Initialize components of the GUI Create all the GUI components, set their specific properties and add them to the window. Also add any necessary ActionListeners.
 */
private void initComponents(){
  setTitle("String_Node_Str");
  setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
  setSize(325,340);
  setResizable(false);
  setLocationRelativeTo(null);
  setResizable(false);
  setLayout(new FlowLayout());
  setResizable(true);
  try {
    UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
  }
 catch (  Exception e) {
  }
  mainPanel=new JPanel();
  mainPanel.setBorder(BorderFactory.createLoweredBevelBorder());
  BufferedImage temp=null;
  try {
    temp=ImageIO.read(getClass().getResource("String_Node_Str"));
  }
 catch (  IOException e1) {
    e1.printStackTrace();
  }
  ImageIcon picture=new ImageIcon(temp);
  JLabel pictureHolder=new JLabel();
  picture.setImage(picture.getImage().getScaledInstance(300,200,Image.SCALE_SMOOTH));
  pictureHolder.setIcon(picture);
  newGame=new JButton("String_Node_Str");
  newGame.setToolTipText("String_Node_Str");
  newGame.addActionListener(new ActionListener(){
    @Override public void actionPerformed(    ActionEvent e){
      remove(mainPanel);
      otherPanel=new NewGameMenu();
      setPanel(otherPanel);
      pack();
    }
  }
);
  continueGame=new JButton("String_Node_Str");
  continueGame.setToolTipText("String_Node_Str");
  continueGame.addActionListener(new ActionListener(){
    @Override public void actionPerformed(    ActionEvent arg0){
      try {
        String[] files=FileUtility.getGamesInProgressFileArray();
        if (files == null) {
          JOptionPane.showMessageDialog(null,"String_Node_Str","String_Node_Str",JOptionPane.ERROR_MESSAGE);
          return;
        }
        String choice=(String)JOptionPane.showInputDialog(Driver.getInstance(),"String_Node_Str","String_Node_Str",JOptionPane.PLAIN_MESSAGE,null,files,null);
        if (choice == null)         return;
        FileInputStream f_in=new FileInputStream(FileUtility.getGamesInProgressFile(choice));
        ObjectInputStream obj_in=new ObjectInputStream(f_in);
        Game toPlay=(Game)obj_in.readObject();
        if (gameOptions != null)         gameOptions.setVisible(true);
        remove(mainPanel);
        otherPanel=new PlayGame(toPlay,false);
        setPanel(otherPanel);
        pack();
      }
 catch (      Exception e) {
        e.printStackTrace();
        JOptionPane.showMessageDialog(null,"String_Node_Str","String_Node_Str",JOptionPane.ERROR_MESSAGE);
      }
    }
  }
);
  viewGame=new JButton("String_Node_Str");
  viewGame.setToolTipText("String_Node_Str");
  viewGame.addActionListener(new ActionListener(){
    @Override public void actionPerformed(    ActionEvent arg0){
      try {
        String[] files=FileUtility.getCompletedGamesFileArray();
        if (files == null) {
          JOptionPane.showMessageDialog(null,"String_Node_Str","String_Node_Str",JOptionPane.ERROR_MESSAGE);
          return;
        }
        String choice=(String)JOptionPane.showInputDialog(Driver.getInstance(),"String_Node_Str","String_Node_Str",JOptionPane.PLAIN_MESSAGE,null,files,null);
        if (choice == null)         return;
        File file=FileUtility.getCompletedGamesFile(choice);
        Game toView;
        if (choice.endsWith("String_Node_Str")) {
          try {
            otherPanel=new PlayGame(true,file);
          }
 catch (          Exception e) {
            JOptionPane.showMessageDialog(null,"String_Node_Str");
            return;
          }
        }
 else {
          FileInputStream f_in=new FileInputStream(file);
          ObjectInputStream obj_in=new ObjectInputStream(f_in);
          toView=(Game)obj_in.readObject();
          otherPanel=new PlayGame(toView,true);
        }
        remove(mainPanel);
        setPanel(otherPanel);
        pack();
      }
 catch (      Exception e) {
        e.printStackTrace();
        JOptionPane.showMessageDialog(null,"String_Node_Str","String_Node_Str",JOptionPane.ERROR_MESSAGE);
      }
    }
  }
);
  createType=new JButton("String_Node_Str");
  createType.setToolTipText("String_Node_Str");
  createType.addActionListener(new ActionListener(){
    @Override public void actionPerformed(    ActionEvent e){
      remove(mainPanel);
      otherPanel=new NewTypeMenu();
      setPanel(otherPanel);
      pack();
    }
  }
);
  menuBar=new JMenuBar();
  fileMenu=new JMenu("String_Node_Str");
  fileMenu.setMnemonic('F');
  helpMenu=new JMenu("String_Node_Str");
  helpMenu.setMnemonic('H');
  final JFrame help=setUpHelp();
  final JFrame about=setUpAbout();
  JMenuItem helpMenuItem=new JMenuItem("String_Node_Str",KeyEvent.VK_H);
  helpMenuItem.setToolTipText("String_Node_Str");
  helpMenuItem.addActionListener(new ActionListener(){
    @Override public void actionPerformed(    ActionEvent e){
      help.setVisible(true);
    }
  }
);
  helpMenu.add(helpMenuItem);
  JMenuItem aboutItem=new JMenuItem("String_Node_Str",KeyEvent.VK_A);
  aboutItem.setToolTipText("String_Node_Str");
  aboutItem.addActionListener(new ActionListener(){
    @Override public void actionPerformed(    ActionEvent e){
      about.setVisible(true);
    }
  }
);
  helpMenu.add(aboutItem);
  JMenuItem newGameItem=new JMenuItem("String_Node_Str",KeyEvent.VK_N);
  newGameItem.setToolTipText("String_Node_Str");
  newGameItem.addActionListener(new ActionListener(){
    @Override public void actionPerformed(    ActionEvent e){
      remove(mainPanel);
      if (otherPanel != null)       remove(otherPanel);
      otherPanel=new NewGameMenu();
      setPanel(otherPanel);
      pack();
    }
  }
);
  fileMenu.add(newGameItem);
  mainMenu=new JMenuItem("String_Node_Str",KeyEvent.VK_M);
  mainMenu.setToolTipText("String_Node_Str");
  mainMenu.addActionListener(new ActionListener(){
    @Override public void actionPerformed(    ActionEvent arg0){
      if (gameOptions != null)       gameOptions.setVisible(false);
      if (otherPanel != null)       remove(otherPanel);
      ChessTimer.stopTimers();
      add(mainPanel);
      pack();
    }
  }
);
  mainMenu.setVisible(false);
  fileMenu.add(mainMenu);
  JMenuItem exitMenuItem=new JMenuItem("String_Node_Str",KeyEvent.VK_Q);
  exitMenuItem.setToolTipText("String_Node_Str");
  exitMenuItem.addActionListener(new ActionListener(){
    @Override public void actionPerformed(    ActionEvent e){
      int answer=JOptionPane.showConfirmDialog(null,"String_Node_Str","String_Node_Str",JOptionPane.YES_NO_OPTION);
      if (answer == 0)       System.exit(0);
    }
  }
);
  fileMenu.add(exitMenuItem);
  menuBar.add(fileMenu);
  menuBar.add(helpMenu);
  setJMenuBar(menuBar);
  mainPanel.setLayout(new GridBagLayout());
  GridBagConstraints c=new GridBagConstraints();
  c.fill=GridBagConstraints.HORIZONTAL;
  c.weightx=0.0;
  c.gridwidth=3;
  c.gridx=0;
  c.gridy=0;
  mainPanel.add(pictureHolder,c);
  c.fill=GridBagConstraints.HORIZONTAL;
  c.gridx=0;
  c.gridy=1;
  c.gridwidth=2;
  mainPanel.add(newGame,c);
  c.gridx=2;
  c.gridy=1;
  c.gridwidth=1;
  mainPanel.add(createType,c);
  c.fill=GridBagConstraints.HORIZONTAL;
  c.gridx=0;
  c.gridy=2;
  c.gridwidth=2;
  mainPanel.add(continueGame,c);
  c.gridx=2;
  c.gridy=2;
  c.gridwidth=1;
  mainPanel.add(viewGame,c);
  add(mainPanel);
  setVisible(true);
}