Program: 74388
Project: 74388
Buggy source:
/** 
 * Run a complete execution of the referenced model.  A complete execution consists of invocation of super.initialize(), repeated invocations of super.prefire(), super.fire(), and super.postfire(), followed by super.wrapup().  The invocations of prefire(), fire(), and postfire() are repeated until either the model indicates it is not ready to execute (prefire() returns false), or it requests a stop (postfire() returns false or stop() is called). Before running the complete execution, this method examines input ports, and if they are connected, have data, and if the referenced model has a top-level parameter with the same name, then one token is read from the input port and used to set the value of the parameter in the referenced model. After running the complete execution, if there are any output ports, then this method looks for top-level parameters in the referenced model with the same name as the output ports, and if there are any, reads their values and produces them on the output. If no model has been specified, then this method does nothing.
 * @exception IllegalActionException If there is no director, or ifthe director's action methods throw it.
 */
public void fire() throws IllegalActionException {
  _readInputsAndValidateSettables();
  _alreadyReadInputs=true;
  if (_model instanceof CompositeActor) {
    NamedObj toplevel=toplevel();
    final Effigy myEffigy=Configuration.findEffigy(toplevel);
    if (myEffigy != null) {
      try {
        if ((_openOnFiringValue == _OPEN_IN_VERGIL) || (_openOnFiringValue == _OPEN_IN_VERGIL_FULL_SCREEN)) {
          Runnable doOpen=new Runnable(){
            public void run(){
              Configuration configuration=(Configuration)myEffigy.toplevel();
              if (_debugging) {
                _debug("String_Node_Str");
              }
              try {
                _exception=null;
                _tableau=configuration.openModel(_model,myEffigy);
                _tableau.setMaster(true);
              }
 catch (              KernelException e) {
                _exception=e;
              }
              _tableau.show();
              JFrame frame=_tableau.getFrame();
              if (frame != null) {
                if (_openOnFiringValue == _OPEN_IN_VERGIL_FULL_SCREEN) {
                  if (frame instanceof ExtendedGraphFrame) {
                    ((ExtendedGraphFrame)frame).fullScreen();
                  }
                }
                frame.toFront();
              }
            }
          }
;
          try {
            SwingUtilities.invokeAndWait(doOpen);
          }
 catch (          Exception ex) {
            throw new IllegalActionException(this,null,ex,"String_Node_Str");
          }
          if (_exception != null) {
            throw new IllegalActionException(this,null,_exception,"String_Node_Str");
          }
        }
 else {
          PtolemyEffigy newEffigy=new PtolemyEffigy(myEffigy,myEffigy.uniqueName(_model.getName()));
          newEffigy.setModel(_model);
          newEffigy.setModifiable(false);
          if (_debugging) {
            _debug("String_Node_Str");
          }
        }
      }
 catch (      NameDuplicationException ex) {
        throw new InternalErrorException(ex);
      }
    }
  }
  super.fire();
}

Fixed version (ground truth):
/** 
 * Run a complete execution of the referenced model.  A complete execution consists of invocation of super.initialize(), repeated invocations of super.prefire(), super.fire(), and super.postfire(), followed by super.wrapup().  The invocations of prefire(), fire(), and postfire() are repeated until either the model indicates it is not ready to execute (prefire() returns false), or it requests a stop (postfire() returns false or stop() is called). Before running the complete execution, this method examines input ports, and if they are connected, have data, and if the referenced model has a top-level parameter with the same name, then one token is read from the input port and used to set the value of the parameter in the referenced model. After running the complete execution, if there are any output ports, then this method looks for top-level parameters in the referenced model with the same name as the output ports, and if there are any, reads their values and produces them on the output. If no model has been specified, then this method does nothing.
 * @exception IllegalActionException If there is no director, or ifthe director's action methods throw it.
 */
public void fire() throws IllegalActionException {
  _readInputsAndValidateSettables();
  _alreadyReadInputs=true;
  if (_model instanceof CompositeActor) {
    NamedObj toplevel=toplevel();
    final Effigy myEffigy=Configuration.findEffigy(toplevel);
    if (myEffigy != null) {
      try {
        if ((_openOnFiringValue == _OPEN_IN_VERGIL) || (_openOnFiringValue == _OPEN_IN_VERGIL_FULL_SCREEN)) {
          Runnable doOpen=new Runnable(){
            public void run(){
              Configuration configuration=(Configuration)myEffigy.toplevel();
              if (_debugging) {
                _debug("String_Node_Str");
              }
              try {
                _exception=null;
                _tableau=configuration.openModel(_model,myEffigy);
                _tableau.setMaster(true);
              }
 catch (              KernelException e) {
                _exception=e;
              }
              _tableau.show();
              JFrame frame=_tableau.getFrame();
              if (frame != null) {
                if (_openOnFiringValue == _OPEN_IN_VERGIL_FULL_SCREEN) {
                  if (frame instanceof ExtendedGraphFrame) {
                    ((ExtendedGraphFrame)frame).fullScreen();
                  }
                }
                frame.toFront();
              }
            }
          }
;
          try {
            SwingUtilities.invokeAndWait(doOpen);
          }
 catch (          Exception ex) {
            throw new IllegalActionException(this,null,ex,"String_Node_Str");
          }
          if (_exception != null) {
            throw new IllegalActionException(this,null,_exception,"String_Node_Str");
          }
        }
 else {
          if (_effigy == null) {
            _effigy=new PtolemyEffigy(myEffigy,myEffigy.uniqueName(_model.getName()));
            _effigy.setModel(_model);
            _effigy.setModifiable(false);
            if (_debugging) {
              _debug("String_Node_Str");
            }
          }
        }
      }
 catch (      NameDuplicationException ex) {
        throw new InternalErrorException(ex);
      }
    }
  }
  super.fire();
}