Program: 76085
Project: 76085
Buggy source:
/** 
 * Execute the model.  Begin with the initialization phase, followed by a sequence of iterations, followed by a wrapup phase. The sequence of iterations concludes when the postfire() method of the container (the top-level composite actor) returns false, or when the finish() method is called. <p> The execution is performed in the calling thread (the current thread), so this method returns only after execution finishes. If you wish to perform execution in a new thread, use startRun() instead.  Even if an exception occurs during the execution, the wrapup() method is called (in a finally clause).  It is up to the caller to handle (i.e. report) the exception. If you do not wish to handle exceptions, but want to execute within the calling thread, use run().
 * @exception KernelException If the model throws it.
 * @exception IllegalActionException If the model is already running, orif there is no container.
 */
public synchronized void execute() throws KernelException, IllegalActionException {
  long startTime=(new Date()).getTime();
  boolean completedSuccessfully=false;
  try {
    initialize();
    if (_debugging)     _debug("String_Node_Str");
    while (!_finishRequested) {
      if (!iterate())       break;
      if (_pauseRequested) {
        _setState(PAUSED);
        while (_pauseRequested) {
          try {
            wait();
          }
 catch (          InterruptedException e) {
          }
        }
      }
    }
    completedSuccessfully=true;
  }
  finally {
    wrapup();
    if (_state != IDLE) {
      _setState(IDLE);
    }
    _finishRequested=false;
    if (completedSuccessfully) {
      _notifyListenersOfCompletion();
    }
  }
  long endTime=(new Date()).getTime();
  System.out.println("String_Node_Str" + (endTime - startTime) + "String_Node_Str");
}

Fixed version (ground truth):
/** 
 * Execute the model.  Begin with the initialization phase, followed by a sequence of iterations, followed by a wrapup phase. The sequence of iterations concludes when the postfire() method of the container (the top-level composite actor) returns false, or when the finish() method is called. <p> The execution is performed in the calling thread (the current thread), so this method returns only after execution finishes. If you wish to perform execution in a new thread, use startRun() instead.  Even if an exception occurs during the execution, the wrapup() method is called (in a finally clause).  It is up to the caller to handle (i.e. report) the exception. If you do not wish to handle exceptions, but want to execute within the calling thread, use run().
 * @exception KernelException If the model throws it.
 * @exception IllegalActionException If the model is already running, orif there is no container.
 */
public synchronized void execute() throws KernelException, IllegalActionException {
  long startTime=(new Date()).getTime();
  boolean completedSuccessfully=false;
  try {
    initialize();
    if (_debugging)     _debug("String_Node_Str");
    while (!_finishRequested) {
      if (!iterate())       break;
      if (_pauseRequested) {
        _setState(PAUSED);
        while (_pauseRequested) {
          try {
            wait();
          }
 catch (          InterruptedException e) {
          }
        }
      }
    }
    completedSuccessfully=true;
  }
  finally {
    try {
      wrapup();
    }
  finally {
      if (_state != IDLE) {
        _setState(IDLE);
      }
      _finishRequested=false;
      if (completedSuccessfully) {
        _notifyListenersOfCompletion();
      }
    }
  }
  long endTime=(new Date()).getTime();
  System.out.println("String_Node_Str" + (endTime - startTime) + "String_Node_Str");
}