Program: 74031
Project: 74031
Buggy source:
/** 
 * Query the user for a filename, save the model to that file, and open a new window to view the model. This overrides the base class to update the entry in the ModelDirectory and to rename the model to match the file name.
 * @param extension If non-null, then the extension that isappended to the file name if there is no extension.
 * @return True if the save succeeds.
 */
protected boolean _saveAs(String extension){
  if (_tableau == null) {
    throw new InternalErrorException("String_Node_Str");
  }
  Color background=null;
  try {
    background=_saveBackground();
    JFileChooser fileDialog=_saveAsFileDialog();
    if (_initialSaveAsFileName != null) {
      fileDialog.setSelectedFile(new File(fileDialog.getCurrentDirectory(),_initialSaveAsFileName));
    }
    int returnVal=fileDialog.showSaveDialog(this);
    if (returnVal == JFileChooser.APPROVE_OPTION) {
      File file=fileDialog.getSelectedFile();
      if (extension != null && file.getName().indexOf("String_Node_Str") == -1) {
        file=new File(file.getAbsolutePath() + extension);
      }
      try {
        if (!_confirmFile(null,file)) {
          return false;
        }
        URL newURL=file.toURI().toURL();
        String newKey=newURL.toExternalForm();
        _directory=fileDialog.getCurrentDirectory();
        _writeFile(file);
        getConfiguration().openModel(newURL,newURL,newKey);
        Effigy effigy=getEffigy();
        if (effigy != null) {
          String id=effigy.identifier.getExpression();
          if (id.equals("String_Node_Str")) {
            effigy.setContainer(null);
          }
        }
        return true;
      }
 catch (      Exception ex) {
        report("String_Node_Str",ex);
        return false;
      }
    }
    return false;
  }
  finally {
    _restoreBackground(background);
  }
}

Fixed version (ground truth):
/** 
 * Query the user for a filename, save the model to that file, and open a new window to view the model. This overrides the base class to update the entry in the ModelDirectory and to rename the model to match the file name.
 * @param extension If non-null, then the extension that isappended to the file name if there is no extension.
 * @return True if the save succeeds.
 */
protected boolean _saveAs(String extension){
  if (_tableau == null) {
    throw new InternalErrorException("String_Node_Str");
  }
  JFileChooserBugFix jFileChooserBugFix=new JFileChooserBugFix();
  Color background=null;
  try {
    background=jFileChooserBugFix.saveBackground();
    JFileChooser fileDialog=_saveAsFileDialog();
    if (_initialSaveAsFileName != null) {
      fileDialog.setSelectedFile(new File(fileDialog.getCurrentDirectory(),_initialSaveAsFileName));
    }
    int returnVal=fileDialog.showSaveDialog(this);
    if (returnVal == JFileChooser.APPROVE_OPTION) {
      File file=fileDialog.getSelectedFile();
      if (extension != null && file.getName().indexOf("String_Node_Str") == -1) {
        file=new File(file.getAbsolutePath() + extension);
      }
      try {
        if (!_confirmFile(null,file)) {
          return false;
        }
        URL newURL=file.toURI().toURL();
        String newKey=newURL.toExternalForm();
        _directory=fileDialog.getCurrentDirectory();
        _writeFile(file);
        getConfiguration().openModel(newURL,newURL,newKey);
        Effigy effigy=getEffigy();
        if (effigy != null) {
          String id=effigy.identifier.getExpression();
          if (id.equals("String_Node_Str")) {
            effigy.setContainer(null);
          }
        }
        return true;
      }
 catch (      Exception ex) {
        report("String_Node_Str",ex);
        return false;
      }
    }
    return false;
  }
  finally {
    jFileChooserBugFix.restoreBackground(background);
  }
}