Program: 75944
Project: 75944
Buggy source:
/** 
 * Construct a dialog with the specified owner and target. An "OK" and a "Cancel" button are added to the dialog. The dialog is placed relative to the owner.
 * @param owner The object that, per the user, appears to begenerating the dialog.
 * @param target The object whose parameters are being edited.
 */
public EditParametersDialog(Frame owner,NamedObj target){
  super(owner,"String_Node_Str" + target.getName(),new Configurer(target),_moreButtons);
  _owner=owner;
  _target=target;
  if (buttonPressed().equals("String_Node_Str")) {
    _openAddDialog(null,"String_Node_Str","String_Node_Str","String_Node_Str");
    _target.removeChangeListener(this);
  }
 else   if (buttonPressed().equals("String_Node_Str")) {
    List attList=_target.attributeList(Settable.class);
    Iterator parameters=attList.iterator();
    int count=0;
    while (parameters.hasNext()) {
      Settable param=(Settable)parameters.next();
      if (param.getVisibility() == Settable.FULL)       count++;
    }
    String[] attNames=new String[count];
    Iterator params=attList.iterator();
    int index=0;
    while (params.hasNext()) {
      Settable param=(Settable)params.next();
      if (param.getVisibility() == Settable.FULL) {
        attNames[index++]=((Attribute)param).getName();
      }
    }
    Query query=new Query();
    query.addChoice("String_Node_Str","String_Node_Str",attNames,null,false);
    ComponentDialog dialog=new ComponentDialog(_owner,"String_Node_Str" + _target.getFullName(),query,null);
    String delName=query.stringValue("String_Node_Str");
    if (dialog.buttonPressed().equals("String_Node_Str") && !delName.equals("String_Node_Str")) {
      String moml="String_Node_Str" + delName + "String_Node_Str";
      _target.addChangeListener(this);
      _target.requestChange(new MoMLChangeRequest(this,_target,moml));
    }
  }
 else   if (buttonPressed().equals("String_Node_Str")) {
    try {
      StyleConfigurer panel=new StyleConfigurer(target);
      ComponentDialog dialog=new ComponentDialog(_owner,"String_Node_Str" + target.getName(),panel);
      if (!(dialog.buttonPressed().equals("String_Node_Str"))) {
        panel.restore();
      }
    }
 catch (    IllegalActionException ex) {
      MessageHandler.error("String_Node_Str",ex);
    }
  }
}

Fixed version (ground truth):
/** 
 * Construct a dialog with the specified owner and target. A "Commit" and a "Cancel" button are added to the dialog. The dialog is placed relative to the owner.
 * @param owner The object that, per the user, appears to begenerating the dialog.
 * @param target The object whose parameters are being edited.
 */
public EditParametersDialog(Frame owner,NamedObj target){
  super(owner,"String_Node_Str" + target.getName(),new Configurer(target),_moreButtons);
  _owner=owner;
  _target=target;
  if (buttonPressed().equals("String_Node_Str")) {
    _openAddDialog(null,"String_Node_Str","String_Node_Str","String_Node_Str");
    _target.removeChangeListener(this);
  }
 else   if (buttonPressed().equals("String_Node_Str")) {
    List attList=_target.attributeList(Settable.class);
    Iterator parameters=attList.iterator();
    int count=0;
    while (parameters.hasNext()) {
      Settable param=(Settable)parameters.next();
      if (param.getVisibility() == Settable.FULL)       count++;
    }
    String[] attNames=new String[count];
    Iterator params=attList.iterator();
    int index=0;
    while (params.hasNext()) {
      Settable param=(Settable)params.next();
      if (param.getVisibility() == Settable.FULL) {
        attNames[index++]=((Attribute)param).getName();
      }
    }
    Query query=new Query();
    query.addChoice("String_Node_Str","String_Node_Str",attNames,null,false);
    ComponentDialog dialog=new ComponentDialog(_owner,"String_Node_Str" + _target.getFullName(),query,null);
    String delName=query.stringValue("String_Node_Str");
    if (dialog.buttonPressed().equals("String_Node_Str") && !delName.equals("String_Node_Str")) {
      String moml="String_Node_Str" + delName + "String_Node_Str";
      _target.addChangeListener(this);
      _target.requestChange(new MoMLChangeRequest(this,_target,moml));
    }
  }
 else   if (buttonPressed().equals("String_Node_Str")) {
    try {
      StyleConfigurer panel=new StyleConfigurer(target);
      ComponentDialog dialog=new ComponentDialog(_owner,"String_Node_Str" + target.getName(),panel);
      if (!(dialog.buttonPressed().equals("String_Node_Str"))) {
        panel.restore();
      }
      new EditParametersDialog(_owner,_target);
    }
 catch (    IllegalActionException ex) {
      MessageHandler.error("String_Node_Str",ex);
    }
  }
}