Program: 21671
Project: 21671
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);
  }
  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");
    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;
}