Program: 76535
Project: 76535
Buggy source:
/** 
 * Create a guarded communication with a send communication.
 * @param guard The guard for the guarded communication statementrepresented by this object.
 * @param port The IOPort containing the channel (and thus receiver)that this branch will try to rendezvous with.
 * @param channel The channel in the IOPort that this branch istrying to rendezvous with.
 * @param branch The identification number assigned to this branchupon creation by the CSPActor.
 * @exception IllegalActionException If the channel has morethan one receiver or if the receiver is not of type CSPReceiver.
 */
public ConditionalSend(boolean guard,IOPort port,int channel,int branchID,Token t) throws IllegalActionException {
  super(guard,port,branchID);
  Receiver[][] receivers;
  try {
    port.workspace().getReadAccess();
    if (!port.isOutput()) {
      throw new IllegalActionException(port,"String_Node_Str" + "String_Node_Str");
    }
    if (channel >= port.getWidth() || channel < 0) {
      throw new IllegalActionException(port,"String_Node_Str" + "String_Node_Str");
    }
    receivers=port.getRemoteReceivers();
    if (receivers == null || receivers[channel] == null) {
      throw new IllegalActionException(port,"String_Node_Str" + "String_Node_Str");
    }
    if (receivers[channel].length != 1) {
      throw new IllegalActionException(port,"String_Node_Str" + "String_Node_Str" + channel + "String_Node_Str"+ "String_Node_Str");
    }
    if (!(receivers[channel][0] instanceof CSPReceiver)) {
      throw new IllegalActionException(port,"String_Node_Str" + "String_Node_Str" + channel + "String_Node_Str"+ "String_Node_Str");
    }
    _receiver=(CSPReceiver)receivers[channel][0];
  }
  finally {
    port.workspace().doneReading();
  }
  _token=t;
}

Fixed version (ground truth):
/** 
 * Create a guarded communication with a send communication.
 * @param guard The guard for the guarded communication statementrepresented by this object.
 * @param port The IOPort containing the channel (and thus receiver)that this branch will try to rendezvous with.
 * @param channel The channel in the IOPort that this branch istrying to rendezvous with.
 * @param branch The identification number assigned to this branchupon creation by the CSPActor.
 * @exception IllegalActionException If the channel has morethan one receiver or if the receiver is not of type CSPReceiver.
 */
public ConditionalSend(boolean guard,IOPort port,int channel,int branchID,Token t) throws IllegalActionException {
  super(guard,port,branchID);
  Receiver[][] receivers;
  try {
    port.workspace().getReadAccess();
    if (!port.isOutput()) {
      throw new IllegalActionException(port,"String_Node_Str" + "String_Node_Str");
    }
    if (channel >= port.getWidth() || channel < 0) {
      throw new IllegalActionException(port,"String_Node_Str" + "String_Node_Str");
    }
    receivers=port.getRemoteReceivers();
    if (receivers == null || receivers[channel] == null) {
      throw new IllegalActionException(port,"String_Node_Str" + "String_Node_Str");
    }
    if (receivers[channel].length != 1) {
      throw new IllegalActionException(port,"String_Node_Str" + "String_Node_Str" + channel + "String_Node_Str"+ "String_Node_Str");
    }
    if (!(receivers[channel][0] instanceof CSPReceiver)) {
      throw new IllegalActionException(port,"String_Node_Str" + "String_Node_Str" + channel + "String_Node_Str"+ "String_Node_Str");
    }
    _receiver=(CSPReceiver)receivers[channel][0];
  }
 catch (  IllegalActionException ex) {
    _guard=false;
  }
 finally {
    port.workspace().doneReading();
  }
  _token=t;
}