Program: 75494
Project: 75494
Buggy source:
/** 
 * Retrieve a Token from the receiver by rendezvous. This method does not return until the rendezvous has been completed. If a put has already been reached, it notifies the waiting put and waits for the rendezvous to complete. When the rendezvous is complete it returns with the token. If a put has not yet been reached, the method delays until a put is reached. It is assumed that at most one process is trying to receive from and send to the channel associated with this receiver.
 * @return The token transferred by the rendezvous.
 * @exception TerminateProcessException If execution terminationhas been requested, or if the execution is abruptly terminated from the outside (via an InterruptedException).
 */
public synchronized Token get(Branch branch){
  Token tmp=null;
  boolean blocked=false;
  try {
    if (_isPutWaiting()) {
      _setPutWaiting(false);
      tmp=_token;
      _setRendezvousComplete(false);
      notifyAll();
      while (!_isRendezvousComplete()) {
        _checkFlagsAndWait();
      }
    }
 else {
      _setGetWaiting(true);
      notifyAll();
      while (_isConditionalSendWaiting()) {
        _checkFlagsAndWait();
      }
      _checkFlags();
      prepareToBlock(branch);
      blocked=true;
      while (_isGetWaiting()) {
        _checkFlagsAndWait();
      }
      _checkFlags();
      wakeUpBlockedPartner();
      blocked=false;
      tmp=_token;
      _setRendezvousComplete(true);
      notifyAll();
    }
  }
 catch (  InterruptedException ex) {
    throw new TerminateProcessException("String_Node_Str");
  }
 finally {
    if (blocked) {
      wakeUpBlockedPartner();
    }
  }
  return tmp;
}

Fixed version (ground truth):
/** 
 * Retrieve a Token from the receiver by rendezvous. This method does not return until the rendezvous has been completed. If a put has already been reached, it notifies the waiting put and waits for the rendezvous to complete. When the rendezvous is complete it returns with the token. If a put has not yet been reached, the method delays until a put is reached. It is assumed that at most one process is trying to receive from and send to the channel associated with this receiver.
 * @return The token transferred by the rendezvous.
 * @exception TerminateProcessException If execution terminationhas been requested, or if the execution is abruptly terminated from the outside (via an InterruptedException).
 */
public synchronized Token get(Branch branch){
  Token tmp=null;
  boolean blocked=false;
  try {
    if (_isPutWaiting()) {
      _setPutWaiting(false);
      tmp=_token;
      _setRendezvousComplete(false);
      notifyAll();
      while (!_isRendezvousComplete()) {
        _checkFlagsAndWait();
      }
    }
 else {
      _setGetWaiting(true);
      notifyAll();
      while (_isConditionalSendWaiting()) {
        _checkFlagsAndWait();
      }
      _checkFlags();
      markBlocked(branch);
      blocked=true;
      while (_isGetWaiting()) {
        _checkFlagsAndWait();
      }
      _checkFlags();
      markUnblocked();
      blocked=false;
      tmp=_token;
      _setRendezvousComplete(true);
      notifyAll();
    }
  }
 catch (  InterruptedException ex) {
    throw new TerminateProcessException("String_Node_Str");
  }
 finally {
    if (blocked) {
      markUnblocked();
    }
  }
  return tmp;
}