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

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