Program: 73662
Project: 73662
Buggy source:
protected void _open(){
  JFileChooser chooser=new JFileChooser();
  FileFilter filter=new SearchCriteriaFileFilter("String_Node_Str");
  chooser.setFileFilter(filter);
  chooser.setDialogTitle("String_Node_Str");
  int returnVal=chooser.showOpenDialog(this);
  if (returnVal == JFileChooser.APPROVE_OPTION) {
    try {
      if (isModified()) {
        Object[] options={"String_Node_Str","String_Node_Str","String_Node_Str"};
        int n=JOptionPane.showOptionDialog(this,"String_Node_Str","String_Node_Str",JOptionPane.YES_NO_CANCEL_OPTION,JOptionPane.QUESTION_MESSAGE,null,options,options[2]);
        if (n == JOptionPane.YES_OPTION) {
          _save();
        }
 else         if (n == JOptionPane.CANCEL_OPTION) {
          return;
        }
      }
      _searchCriteria.setModelName("String_Node_Str");
      try {
        StringParameter test=new StringParameter(new NamedObj(),"String_Node_Str");
        test.setName("String_Node_Str");
        test.setExpression("String_Node_Str");
        ArrayList<Attribute> list=new ArrayList();
        list.add(test);
        _searchCriteria.setAttributes(list);
      }
 catch (      IllegalActionException e) {
      }
catch (      NameDuplicationException e) {
      }
      _topPanel.removeAll();
      _attributesListPanel=new AttributesListPanel(new NamedObj());
      _topPanel.add(_attributesListPanel);
      validate();
      repaint();
      if (_searchCriteria.getModelName() != null) {
        _attributesListPanel.setModelName(_searchCriteria.getModelName());
      }
      if (_searchCriteria.getAttributes() != null) {
        for (        Attribute attribute : _searchCriteria.getAttributes()) {
          _attributesListPanel.addAttribute((StringParameter)attribute);
        }
      }
      _saveLocation=chooser.getSelectedFile().getCanonicalPath();
      setModified(false);
    }
 catch (    IOException e) {
      MessageHandler.error("String_Node_Str",e);
    }
  }
}

Fixed version (ground truth):
/** 
 * Open a previously saved search criteria file.  If the currently opened search criteria was changed, give the user an opportunity to save it.
 */
protected void _open(){
  JFileChooser chooser=new JFileChooser();
  FileFilter filter=new SearchCriteriaFileFilter("String_Node_Str");
  chooser.setFileFilter(filter);
  chooser.setDialogTitle("String_Node_Str");
  int returnVal=chooser.showOpenDialog(this);
  if (returnVal == JFileChooser.APPROVE_OPTION) {
    try {
      if (isModified()) {
        Object[] options={"String_Node_Str","String_Node_Str","String_Node_Str"};
        int n=JOptionPane.showOptionDialog(this,"String_Node_Str","String_Node_Str",JOptionPane.YES_NO_CANCEL_OPTION,JOptionPane.QUESTION_MESSAGE,null,options,options[2]);
        if (n == JOptionPane.YES_OPTION) {
          _save();
        }
 else         if (n == JOptionPane.CANCEL_OPTION) {
          return;
        }
      }
      _searchCriteria.setModelName("String_Node_Str");
      try {
        StringParameter test=new StringParameter(new NamedObj(),"String_Node_Str");
        test.setName("String_Node_Str");
        test.setExpression("String_Node_Str");
        ArrayList<Attribute> list=new ArrayList();
        list.add(test);
        _searchCriteria.setAttributes(list);
      }
 catch (      IllegalActionException e) {
      }
catch (      NameDuplicationException e) {
      }
      _topPanel.removeAll();
      _attributesListPanel=new AttributesListPanel(new NamedObj());
      _topPanel.add(_attributesListPanel);
      validate();
      repaint();
      if (_searchCriteria.getModelName() != null) {
        _attributesListPanel.setModelName(_searchCriteria.getModelName());
      }
      if (_searchCriteria.getAttributes() != null) {
        for (        Attribute attribute : _searchCriteria.getAttributes()) {
          _attributesListPanel.addAttribute((StringParameter)attribute);
        }
      }
      _saveLocation=chooser.getSelectedFile().getCanonicalPath();
      setModified(false);
    }
 catch (    IOException e) {
      MessageHandler.error("String_Node_Str",e);
    }
  }
}