Program: 75198
Project: 75198
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 {
  if (_model instanceof CompositeActor) {
    CompositeActor executable=(CompositeActor)_model;
    NamedObj toplevel=toplevel();
    Effigy myEffigy=Configuration.findEffigy(toplevel);
    if (myEffigy != null) {
      try {
        if (_openOnFiringValue == _OPEN_IN_VERGIL || _openOnFiringValue == _OPEN_IN_VERGIL_FULL_SCREEN) {
          Configuration configuration=(Configuration)myEffigy.toplevel();
          if (_debugging) {
            _debug("String_Node_Str");
          }
          _tableau=configuration.openModel(_model,myEffigy);
          _tableau.setEditable(false);
          _tableau.show();
        }
 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);
      }
    }
    if (_tableau != null) {
      JFrame frame=_tableau.getFrame();
      if (frame != null) {
        if (_openOnFiringValue == _OPEN_IN_VERGIL) {
          frame.toFront();
        }
 else         if (_openOnFiringValue == _OPEN_IN_VERGIL_FULL_SCREEN) {
          if (frame instanceof ExtendedGraphFrame) {
            ((ExtendedGraphFrame)frame).fullScreen();
          }
 else {
            frame.toFront();
          }
        }
      }
    }
  }
  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 {
  _readInputs();
  _alreadyReadInputs=true;
  if (_model instanceof CompositeActor) {
    CompositeActor executable=(CompositeActor)_model;
    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) {
                frame.toFront();
                if (_openOnFiringValue == _OPEN_IN_VERGIL_FULL_SCREEN) {
                  if (frame instanceof ExtendedGraphFrame) {
                    ((ExtendedGraphFrame)frame).fullScreen();
                  }
                }
              }
            }
          }
;
          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();
}