Program: 75196
Project: 75196
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 {
  super.fire();
  if (_throwable != null) {
    Throwable throwable=_throwable;
    _throwable=null;
    throw new IllegalActionException(this,throwable,"String_Node_Str" + "String_Node_Str");
  }
  if (_model instanceof CompositeActor) {
    CompositeActor executable=(CompositeActor)_model;
    _manager=executable.getManager();
    if (_manager == null) {
      throw new InternalErrorException("String_Node_Str");
    }
    if (_debugging) {
      _manager.addDebugListener(this);
      Director director=executable.getDirector();
      if (director != null) {
        director.addDebugListener(this);
      }
    }
 else {
      _manager.removeDebugListener(this);
      Director director=executable.getDirector();
      if (director != null) {
        director.removeDebugListener(this);
      }
    }
    if (_executing) {
synchronized (this) {
        while (_executing) {
          try {
            if (_debugging) {
              _debug("String_Node_Str");
            }
            workspace().wait(this);
          }
 catch (          InterruptedException ex) {
            getManager().finish();
            return;
          }
        }
        if (_debugging) {
          _debug("String_Node_Str");
        }
      }
    }
    _readInputs();
    if (_executionOnFiringValue == _RUN_IN_CALLING_THREAD) {
      if (_debugging) {
        _debug("String_Node_Str");
      }
      try {
        _manager.execute();
      }
 catch (      KernelException ex) {
        throw new IllegalActionException(this,ex,"String_Node_Str");
      }
      _writeOutputs();
    }
 else     if (_executionOnFiringValue == _RUN_IN_A_NEW_THREAD) {
      if (_debugging) {
        _debug("String_Node_Str");
      }
      _manager.addExecutionListener(this);
      if (_manager.getState() != Manager.IDLE) {
        throw new IllegalActionException(this,"String_Node_Str" + "String_Node_Str" + _manager.getState().getDescription());
      }
      Thread thread=new Thread(){
        public void run(){
          try {
            if (_debugging) {
              _debug("String_Node_Str");
            }
            _manager.execute();
            _writeOutputs();
          }
 catch (          Throwable throwable) {
            _manager.notifyListenersOfThrowable(throwable);
          }
        }
      }
;
      thread.setPriority(Thread.MIN_PRIORITY);
      thread.start();
    }
    long lingerTimeValue=((LongToken)lingerTime.getToken()).longValue();
    if (lingerTimeValue > 0L) {
      try {
        if (_debugging) {
          _debug("String_Node_Str" + lingerTimeValue + "String_Node_Str");
        }
        _lingeringThread=Thread.currentThread();
        Thread.sleep(lingerTimeValue);
      }
 catch (      InterruptedException ex) {
      }
 finally {
        _lingeringThread=null;
      }
    }
  }
}

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 {
  super.fire();
  if (_throwable != null) {
    Throwable throwable=_throwable;
    _throwable=null;
    throw new IllegalActionException(this,throwable,"String_Node_Str" + "String_Node_Str");
  }
  if (_model instanceof CompositeActor) {
    CompositeActor executable=(CompositeActor)_model;
    _manager=executable.getManager();
    if (_manager == null) {
      throw new InternalErrorException("String_Node_Str");
    }
    if (_debugging) {
      _manager.addDebugListener(this);
      Director director=executable.getDirector();
      if (director != null) {
        director.addDebugListener(this);
      }
    }
 else {
      _manager.removeDebugListener(this);
      Director director=executable.getDirector();
      if (director != null) {
        director.removeDebugListener(this);
      }
    }
    if (_executing) {
synchronized (this) {
        while (_executing) {
          try {
            if (_debugging) {
              _debug("String_Node_Str");
            }
            workspace().wait(this);
          }
 catch (          InterruptedException ex) {
            getManager().finish();
            return;
          }
        }
        if (_debugging) {
          _debug("String_Node_Str");
        }
      }
    }
    if (!_alreadyReadInputs) {
      _readInputs();
    }
    _alreadyReadInputs=false;
    if (_executionOnFiringValue == _RUN_IN_CALLING_THREAD) {
      if (_debugging) {
        _debug("String_Node_Str");
      }
      try {
        _manager.execute();
      }
 catch (      KernelException ex) {
        throw new IllegalActionException(this,ex,"String_Node_Str");
      }
      _writeOutputs();
    }
 else     if (_executionOnFiringValue == _RUN_IN_A_NEW_THREAD) {
      if (_debugging) {
        _debug("String_Node_Str");
      }
      _manager.addExecutionListener(this);
      if (_manager.getState() != Manager.IDLE) {
        throw new IllegalActionException(this,"String_Node_Str" + "String_Node_Str" + _manager.getState().getDescription());
      }
      Thread thread=new Thread(){
        public void run(){
          try {
            if (_debugging) {
              _debug("String_Node_Str");
            }
            _manager.execute();
            _writeOutputs();
          }
 catch (          Throwable throwable) {
            _manager.notifyListenersOfThrowable(throwable);
          }
        }
      }
;
      thread.setPriority(Thread.MIN_PRIORITY);
      thread.start();
    }
    long lingerTimeValue=((LongToken)lingerTime.getToken()).longValue();
    if (lingerTimeValue > 0L) {
      try {
        if (_debugging) {
          _debug("String_Node_Str" + lingerTimeValue + "String_Node_Str");
        }
        _lingeringThread=Thread.currentThread();
        Thread.sleep(lingerTimeValue);
      }
 catch (      InterruptedException ex) {
      }
 finally {
        _lingeringThread=null;
      }
    }
  }
}