Program: 74969
Project: 74969
Buggy source:
/** 
 * Get the receivers that are ready to form a rendezvous according to the rendezvous semantics. If no rendezvous can be formed starting for the given array of receivers, null is returned.
 * @param receivers The array of receivers to be put to or get from.
 * @param isPut If true, the rendezvous is to put tokens to thereceivers; if false, the rendezvous is to get tokens from the receivers.
 * @param readyReceivers The set of receivers that are already ready for arendezvous, or null if no receivers are already ready.
 * @return A set of receivers that participate in the rendezvous ifit can be formed, or null if no rendezvous can be formed.
 * @see #_commitRendezvous(Set,RendezvousDirector)
 */
private static Set _receiversReadyToCommit(Receiver[][] receivers,boolean isPut,Set readyReceivers){
  if (readyReceivers == null) {
    readyReceivers=new HashSet();
  }
  int oldReadyReceiversSize=readyReceivers.size();
  Set checkedReceivers=_receiversReadyToCommitRecursive(receivers,isPut,readyReceivers);
  if (checkedReceivers == null) {
    return null;
  }
  readyReceivers.addAll(checkedReceivers);
  if (readyReceivers.size() == oldReadyReceiversSize) {
    return readyReceivers;
  }
  Iterator receiverIterator=checkedReceivers.iterator();
  while (receiverIterator.hasNext()) {
    RendezvousReceiver receiver=(RendezvousReceiver)receiverIterator.next();
    Receiver[][][] symmetricReceivers=new Receiver[][][]{receiver._symmetricGetReceivers,receiver._symmetricPutReceivers};
    for (int i=0; i < 2; i++) {
      if (symmetricReceivers[i] != null) {
        Set newCheckedReceivers=_receiversReadyToCommit(symmetricReceivers[i],i == 1,readyReceivers);
        if (newCheckedReceivers == null) {
          return null;
        }
 else {
          readyReceivers.addAll(newCheckedReceivers);
          break;
        }
      }
    }
  }
  return readyReceivers;
}

Fixed version (ground truth):
/** 
 * Get the receivers that are ready to form a rendezvous according to the rendezvous semantics. If no rendezvous can be formed starting for the given array of receivers, null is returned.
 * @param receivers The array of receivers to be put to or get from.
 * @param isPut If true, the rendezvous is to put tokens to thereceivers; if false, the rendezvous is to get tokens from the receivers.
 * @param readyReceivers The set of receivers that are already ready for arendezvous, or null if no receivers are already ready.
 * @return A set of receivers that participate in the rendezvous ifit can be formed, or null if no rendezvous can be formed.
 * @see #_commitRendezvous(Set,RendezvousDirector)
 */
private static Set _receiversReadyToCommit(Receiver[][] receivers,boolean isPut,Set readyReceivers){
  if (readyReceivers == null) {
    readyReceivers=new HashSet();
  }
  int oldReadyReceiversSize=readyReceivers.size();
  Set checkedReceivers=_receiversReadyToCommitRecursive(receivers,isPut,readyReceivers);
  if (checkedReceivers == null) {
    return null;
  }
  readyReceivers.addAll(checkedReceivers);
  if (readyReceivers.size() == oldReadyReceiversSize) {
    return readyReceivers;
  }
  Iterator receiverIterator=checkedReceivers.iterator();
  while (receiverIterator.hasNext()) {
    RendezvousReceiver receiver=(RendezvousReceiver)receiverIterator.next();
    Receiver[][][] symmetricReceivers=new Receiver[][][]{receiver._symmetricGetReceivers,receiver._symmetricPutReceivers};
    for (int i=0; i < 2; i++) {
      if (symmetricReceivers[i] != null) {
        Set newCheckedReceivers=_receiversReadyToCommit(symmetricReceivers[i],i == 1,readyReceivers);
        if (newCheckedReceivers == null) {
          return null;
        }
 else {
          readyReceivers.addAll(newCheckedReceivers);
        }
      }
    }
  }
  return readyReceivers;
}