Program: 21677
Project: 21677
Buggy source:
/** 
 * @return Returns the menuBar.
 */
public JMenuBar initMenuBar(){
  if (menuBar == null) {
    menuBar=new JMenuBar();
    JMenu menu=new JMenu("String_Node_Str");
    AbstractAction loadAction=new AbstractAction(){
      public void actionPerformed(      ActionEvent arg0){
        Frame frame=(Frame)SwingUtilities.getRoot(OTViewer.this);
        FileDialog dialog=new FileDialog(frame,"String_Node_Str",FileDialog.LOAD);
        if (currentFile != null) {
          dialog.setDirectory(currentFile.getParentFile().getAbsolutePath());
          dialog.setFile(currentFile.getName());
        }
        dialog.show();
        String fileName=dialog.getFile();
        if (fileName == null) {
          return;
        }
        fileName=dialog.getDirectory() + fileName;
        System.out.println("String_Node_Str" + fileName);
        loadFile(new File(fileName));
      }
    }
;
    loadAction.putValue(Action.NAME,"String_Node_Str");
    menu.add(loadAction);
    AbstractAction saveAction=new AbstractAction(){
      public void actionPerformed(      ActionEvent arg0){
        if (currentFile == null) {
          saveAsAction.actionPerformed(arg0);
          return;
        }
        if (!currentFile.exists() || checkForReplace(currentFile)) {
          try {
            Exporter.export(currentFile,xmlDB.getRoot(),xmlDB);
          }
 catch (          Exception e) {
            e.printStackTrace();
          }
        }
      }
    }
;
    saveAction.putValue(Action.NAME,"String_Node_Str");
    menu.add(saveAction);
    saveAsAction=new AbstractAction(){
      public void actionPerformed(      ActionEvent arg0){
        Frame frame=(Frame)SwingUtilities.getRoot(OTViewer.this);
        FileDialog dialog=new FileDialog(frame,"String_Node_Str",FileDialog.SAVE);
        if (currentFile != null) {
          dialog.setDirectory(currentFile.getParentFile().getAbsolutePath());
          dialog.setFile(currentFile.getName());
        }
        dialog.show();
        String fileName=dialog.getFile();
        if (fileName == null) {
          return;
        }
        fileName=dialog.getDirectory() + fileName;
        currentFile=new File(fileName);
        if (!fileName.toLowerCase().endsWith("String_Node_Str")) {
          currentFile=new File(currentFile.getAbsolutePath() + "String_Node_Str");
        }
        if (!currentFile.exists() || checkForReplace(currentFile)) {
          try {
            Exporter.export(currentFile,xmlDB.getRoot(),xmlDB);
          }
 catch (          Exception e) {
            e.printStackTrace();
          }
        }
        frame.setTitle(fileName);
      }
    }
;
    saveAsAction.putValue(Action.NAME,"String_Node_Str");
    menu.add(saveAsAction);
    JMenuItem menuItem;
    exitAction=new ExitAction();
    menu.add(exitAction);
    menuBar.add(menu);
  }
  return menuBar;
}

Fixed version (ground truth):
/** 
 * @return Returns the menuBar.
 */
public JMenuBar initMenuBar(){
  if (menuBar == null) {
    menuBar=new JMenuBar();
    JMenu menu=new JMenu("String_Node_Str");
    AbstractAction loadAction=new AbstractAction(){
      public void actionPerformed(      ActionEvent arg0){
        Frame frame=(Frame)SwingUtilities.getRoot(OTViewer.this);
        FileDialog dialog=new FileDialog(frame,"String_Node_Str",FileDialog.LOAD);
        if (currentFile != null) {
          dialog.setDirectory(currentFile.getParentFile().getAbsolutePath());
          dialog.setFile(currentFile.getName());
        }
        dialog.show();
        String fileName=dialog.getFile();
        if (fileName == null) {
          return;
        }
        fileName=dialog.getDirectory() + fileName;
        System.out.println("String_Node_Str" + fileName);
        loadFile(new File(fileName));
      }
    }
;
    loadAction.putValue(Action.NAME,"String_Node_Str");
    menu.add(loadAction);
    AbstractAction saveAction=new AbstractAction(){
      public void actionPerformed(      ActionEvent arg0){
        if (currentFile == null) {
          saveAsAction.actionPerformed(arg0);
          return;
        }
        if (!currentFile.exists() || checkForReplace(currentFile)) {
          try {
            Exporter.export(currentFile,xmlDB.getRoot(),xmlDB);
          }
 catch (          Exception e) {
            e.printStackTrace();
          }
        }
      }
    }
;
    saveAction.putValue(Action.NAME,"String_Node_Str");
    saveAction.setEnabled(false);
    menu.add(saveAction);
    saveAsAction=new AbstractAction(){
      public void actionPerformed(      ActionEvent arg0){
        Frame frame=(Frame)SwingUtilities.getRoot(OTViewer.this);
        FileDialog dialog=new FileDialog(frame,"String_Node_Str",FileDialog.SAVE);
        if (currentFile != null) {
          dialog.setDirectory(currentFile.getParentFile().getAbsolutePath());
          dialog.setFile(currentFile.getName());
        }
        dialog.show();
        String fileName=dialog.getFile();
        if (fileName == null) {
          return;
        }
        fileName=dialog.getDirectory() + fileName;
        currentFile=new File(fileName);
        if (!fileName.toLowerCase().endsWith("String_Node_Str")) {
          currentFile=new File(currentFile.getAbsolutePath() + "String_Node_Str");
        }
        if (!currentFile.exists() || checkForReplace(currentFile)) {
          try {
            Exporter.export(currentFile,xmlDB.getRoot(),xmlDB);
          }
 catch (          Exception e) {
            e.printStackTrace();
          }
        }
        frame.setTitle(fileName);
      }
    }
;
    saveAsAction.putValue(Action.NAME,"String_Node_Str");
    saveAsAction.setEnabled(false);
    menu.add(saveAsAction);
    JCheckBoxMenuItem debugItem=new JCheckBoxMenuItem("String_Node_Str");
    debugItem.addActionListener(new ActionListener(){
      public void actionPerformed(      ActionEvent e){
        Object source=e.getSource();
        if (((JCheckBoxMenuItem)source).isSelected()) {
          System.setProperty("String_Node_Str","String_Node_Str");
        }
 else {
          System.setProperty("String_Node_Str","String_Node_Str");
        }
        updateTreePane();
      }
    }
);
    menu.add(debugItem);
    JMenuItem menuItem;
    exitAction=new ExitAction();
    menu.add(exitAction);
    menuBar.add(menu);
  }
  return menuBar;
}