Program: 76369
Project: 76369
Buggy source:
/** 
 * Do a blocking read on the queue. If no token is available, then inform the director that this receiver is blocking on a read and wait until a token becomes available. When a token becomes available, determine if this queue has the unique oldest receiver time with respect to all of the receivers contained by the actor that contains this receiver; if so, return the token. If the receiver time is a non-unique minimum then determine if this receiver has the highest priority of all receivers that share the non-unique minimum receiver time and if so, return the token. Otherwise throw a NoTokenException. If at any point during this method this receiver is scheduled for termination, then throw a TerminateProcessException to cease execution of the actor that contains this receiver. <P> IMPORTANT: This method is designed to be called after hasToken() has been called. Verify that this method is safe to call by calling hasToken() first.
 * @return Token The oldest token on this queue if this queue hasthe minimum receiver time of all receivers contained by the actor that contains this receiver.
 * @exception NoTokenException If this method is called whilehasToken() returns false.
 */
public Token get() throws NoTokenException {
  DDEDirector director=(DDEDirector)((Actor)getContainer().getContainer()).getDirector();
synchronized (this) {
    if (_terminate) {
      throw new TerminateProcessException("String_Node_Str");
    }
    Token token=super.get();
    if (_writePending) {
      director.removeWriteBlock(this);
      _writePending=false;
      notifyAll();
    }
    Thread thread=Thread.currentThread();
    if (thread instanceof DDEThread) {
      TimeKeeper timeKeeper=((DDEThread)thread).getTimeKeeper();
      timeKeeper.sendOutNullTokens(this);
    }
    return token;
  }
}

Fixed version (ground truth):
/** 
 * Do a blocking read on the queue. If no token is available, then inform the director that this receiver is blocking on a read and wait until a token becomes available. When a token becomes available, determine if this queue has the unique oldest receiver time with respect to all of the receivers contained by the actor that contains this receiver; if so, return the token. If the receiver time is a non-unique minimum then determine if this receiver has the highest priority of all receivers that share the non-unique minimum receiver time and if so, return the token. Otherwise throw a NoTokenException. If at any point during this method this receiver is scheduled for termination, then throw a TerminateProcessException to cease execution of the actor that contains this receiver. <P> IMPORTANT: This method is designed to be called after hasToken() has been called. Verify that this method is safe to call by calling hasToken() first.
 * @return Token The oldest token on this queue if this queue hasthe minimum receiver time of all receivers contained by the actor that contains this receiver.
 * @exception NoTokenException If this method is called whilehasToken() returns false.
 */
public Token get() throws NoTokenException {
  DDEDirector director=(DDEDirector)((Actor)getContainer().getContainer()).getDirector();
  String actorName=((Nameable)getContainer().getContainer()).getName();
synchronized (this) {
    if (_terminate) {
      throw new TerminateProcessException("String_Node_Str");
    }
    Token token=super.get();
    if (_writePending) {
      director.removeWriteBlock(this);
      _writePending=false;
      notifyAll();
    }
    Thread thread=Thread.currentThread();
    if (thread instanceof DDEThread) {
      TimeKeeper timeKeeper=((DDEThread)thread).getTimeKeeper();
      timeKeeper.sendOutNullTokens(this);
    }
    return token;
  }
}