Program: 74960
Project: 74960
Buggy source:
/** 
 * Check whether a rendezvous can be formed starting from the given two-dimensional array of receivers. If a rendezvous can be formed, the ready set contains all the receivers participating in the rendezvous after the call, and true is returned; Otherwise, the ready set is not meaningful.
 * @param receivers The initial two-dimensional array of receivers on anactor.
 * @param isPut Whether the request is put.
 * @param beingChecked The set of receivers that are being checked byprevious recursive calls.
 * @param ready The set of receivers that are ready for a rendezvous.
 * @param notReady The set of receivers that are not ready for arendezvous.
 * @param isSymmetricGet Whether the previous recursive call is from theother side (the get side) of a Merge or Barrier.
 * @param isSymmetricPut Whether the previous recursive call is from theother side (the put side) of a Merge or Barrier.
 * @return Whether a rendezvous can be formed.
 */
private static boolean _checkRendezvous(Receiver[][] receivers,boolean isPut,Set beingChecked,Set ready,Set notReady,boolean isSymmetricGet,boolean isSymmetricPut){
  if (isPut && receivers.length == 0) {
    return true;
  }
  boolean isConditional=false;
  boolean branchReady=false;
  int selectedBranch=_getSelectedBranch(receivers,beingChecked);
  if (selectedBranch >= 0 && (isSymmetricGet || isSymmetricPut)) {
    return false;
  }
  for (int i=0; i < receivers.length; i++) {
    if (receivers[i] != null) {
      branchReady=true;
      for (int j=0; j < receivers[i].length; j++) {
        RendezvousReceiver receiver=(RendezvousReceiver)receivers[i][j];
        if (receiver != null) {
          isConditional=isConditional || (isPut && receiver._putConditional) || (!isPut && receiver._getConditional);
          if (isConditional && (selectedBranch != -1 && selectedBranch != i)) {
            branchReady=false;
            break;
          }
          if (beingChecked.contains(receiver) || ready.contains(receiver)) {
          }
 else           if (notReady.contains(receiver)) {
            branchReady=false;
            break;
          }
 else           if ((receiver._putWaiting == null) || (receiver._getWaiting == null)) {
            branchReady=false;
            notReady.add(receiver);
            break;
          }
 else {
            beingChecked.add(receiver);
            Receiver[][] farSideReceivers=isPut ? receiver._getReceivers : receiver._putReceivers;
            Receiver[][][] dependencies=new Receiver[][][]{farSideReceivers,isSymmetricPut ? null : receiver._symmetricGetReceivers,isSymmetricGet ? null : receiver._symmetricPutReceivers};
            for (int k=0; k < dependencies.length; k++) {
              if (dependencies[k] != null) {
                if (!_checkRendezvous(dependencies[k],(k == 0 && !isPut) || k == 2,beingChecked,ready,notReady,k == 1,k == 2)) {
                  branchReady=false;
                  break;
                }
              }
            }
            beingChecked.remove(receiver);
            if (branchReady) {
              ready.add(receiver);
            }
 else {
              notReady.add(receiver);
              break;
            }
          }
        }
      }
      if ((isConditional && branchReady) || (!isConditional && !branchReady)) {
        break;
      }
    }
  }
  return branchReady;
}

Fixed version (ground truth):
/** 
 * Check whether a rendezvous can be formed starting from the given two-dimensional array of receivers. If a rendezvous can be formed, the ready set contains all the receivers participating in the rendezvous after the call, and true is returned; Otherwise, the ready set is not meaningful.
 * @param receivers The initial two-dimensional array of receivers on anactor.
 * @param isPut Whether the request is put.
 * @param beingChecked The set of receivers that are being checked byprevious recursive calls.
 * @param ready The set of receivers that are ready for a rendezvous.
 * @param notReady The set of receivers that are not ready for arendezvous.
 * @param isSymmetricGet Whether the previous recursive call is from theother side (the get side) of a Merge or Barrier.
 * @param isSymmetricPut Whether the previous recursive call is from theother side (the put side) of a Merge or Barrier.
 * @return Whether a rendezvous can be formed.
 */
private static boolean _checkRendezvous(Receiver[][] receivers,boolean isPut,Set beingChecked,Set ready,Set notReady,boolean isSymmetricGet,boolean isSymmetricPut){
  if (isPut && receivers.length == 0) {
    return true;
  }
  boolean isConditional=false;
  boolean branchReady=false;
  int selectedBranch=_getSelectedBranch(receivers,beingChecked);
  for (int i=0; i < receivers.length; i++) {
    if (receivers[i] != null) {
      branchReady=true;
      for (int j=0; j < receivers[i].length; j++) {
        RendezvousReceiver receiver=(RendezvousReceiver)receivers[i][j];
        if (receiver != null) {
          isConditional=isConditional || (isPut && receiver._putConditional) || (!isPut && receiver._getConditional);
          if (isConditional && (selectedBranch >= 0 && selectedBranch != i)) {
            branchReady=false;
            break;
          }
 else           if (beingChecked.contains(receiver) || ready.contains(receiver)) {
          }
 else           if (notReady.contains(receiver)) {
            branchReady=false;
            break;
          }
 else           if ((receiver._putWaiting == null) || (receiver._getWaiting == null)) {
            branchReady=false;
            notReady.add(receiver);
            break;
          }
 else {
            beingChecked.add(receiver);
            Receiver[][] farSideReceivers=isPut ? receiver._getReceivers : receiver._putReceivers;
            Receiver[][][] dependencies=new Receiver[][][]{farSideReceivers,isSymmetricPut ? null : receiver._symmetricGetReceivers,isSymmetricGet ? null : receiver._symmetricPutReceivers};
            for (int k=0; k < dependencies.length; k++) {
              if (dependencies[k] != null) {
                if (!_checkRendezvous(dependencies[k],(k == 0 && !isPut) || k == 2,beingChecked,ready,notReady,k == 1,k == 2)) {
                  branchReady=false;
                  break;
                }
              }
            }
            beingChecked.remove(receiver);
            if (branchReady) {
              ready.add(receiver);
            }
 else {
              notReady.add(receiver);
              break;
            }
          }
        }
      }
      if ((isConditional && branchReady) || (!isConditional && !branchReady)) {
        break;
      }
    }
  }
  return branchReady;
}