Program: 55309
Project: 55309
Buggy source:
/** 
 * Returns the list of receivers for transfer envelopes produced by the channel with the given source channel ID.
 * @param jobID the ID of the job the given channel ID belongs to
 * @param sourceChannelID the source channel ID for which the receiver list shall be retrieved
 * @return the list of receivers or <code>null</code> if the receiver could not be determined
 * @throws IOException
 * @throws InterruptedExcption
 */
private TransferEnvelopeReceiverList getReceiverList(final JobID jobID,final ChannelID sourceChannelID) throws IOException, InterruptedException {
  TransferEnvelopeReceiverList receiverList=this.receiverCache.get(sourceChannelID);
  if (receiverList != null) {
    return receiverList;
  }
  while (true) {
    if (Thread.currentThread().isInterrupted()) {
      break;
    }
    ConnectionInfoLookupResponse lookupResponse;
synchronized (this.channelLookupService) {
      lookupResponse=this.channelLookupService.lookupConnectionInfo(this.localConnectionInfo,jobID,sourceChannelID);
    }
    if (lookupResponse.isJobAborting()) {
      break;
    }
    if (lookupResponse.receiverNotFound()) {
      LOG.error("String_Node_Str" + sourceChannelID);
      break;
    }
    if (lookupResponse.receiverNotReady()) {
      Thread.sleep(500);
      continue;
    }
    if (lookupResponse.receiverReady()) {
      receiverList=new TransferEnvelopeReceiverList(lookupResponse);
      break;
    }
  }
  if (receiverList != null) {
    this.receiverCache.put(sourceChannelID,receiverList);
    if (LOG.isDebugEnabled()) {
      final StringBuilder sb=new StringBuilder();
      sb.append("String_Node_Str" + sourceChannelID + "String_Node_Str"+ this.localConnectionInfo+ "String_Node_Str");
      if (receiverList.hasLocalReceivers()) {
        sb.append("String_Node_Str");
        final Iterator<ChannelID> it=receiverList.getLocalReceivers().iterator();
        while (it.hasNext()) {
          sb.append("String_Node_Str" + it.next() + "String_Node_Str");
        }
      }
      if (receiverList.hasRemoteReceivers()) {
        sb.append("String_Node_Str");
        final Iterator<RemoteReceiver> it=receiverList.getRemoteReceivers().iterator();
        while (it.hasNext()) {
          sb.append("String_Node_Str" + it.next() + "String_Node_Str");
        }
      }
      LOG.debug(sb.toString());
    }
  }
  return receiverList;
}

Fixed version (ground truth):
/** 
 * Returns the list of receivers for transfer envelopes produced by the channel with the given source channel ID.
 * @param jobID the ID of the job the given channel ID belongs to
 * @param sourceChannelID the source channel ID for which the receiver list shall be retrieved
 * @return the list of receivers or <code>null</code> if the receiver could not be determined
 * @throws IOException
 * @throws InterruptedExcption
 */
private TransferEnvelopeReceiverList getReceiverList(final JobID jobID,final ChannelID sourceChannelID) throws IOException, InterruptedException {
  TransferEnvelopeReceiverList receiverList=this.receiverCache.get(sourceChannelID);
  if (receiverList != null) {
    return receiverList;
  }
  while (true) {
    if (Thread.currentThread().isInterrupted()) {
      break;
    }
    final ConnectionInfoLookupResponse lookupResponse=this.channelLookupService.lookupConnectionInfo(this.localConnectionInfo,jobID,sourceChannelID);
    if (lookupResponse.isJobAborting()) {
      break;
    }
    if (lookupResponse.receiverNotFound()) {
      LOG.error("String_Node_Str" + sourceChannelID);
      break;
    }
    if (lookupResponse.receiverNotReady()) {
      Thread.sleep(500);
      continue;
    }
    if (lookupResponse.receiverReady()) {
      receiverList=new TransferEnvelopeReceiverList(lookupResponse);
      break;
    }
  }
  if (receiverList != null) {
    this.receiverCache.put(sourceChannelID,receiverList);
    if (LOG.isDebugEnabled()) {
      final StringBuilder sb=new StringBuilder();
      sb.append("String_Node_Str" + sourceChannelID + "String_Node_Str"+ this.localConnectionInfo+ "String_Node_Str");
      if (receiverList.hasLocalReceivers()) {
        sb.append("String_Node_Str");
        final Iterator<ChannelID> it=receiverList.getLocalReceivers().iterator();
        while (it.hasNext()) {
          sb.append("String_Node_Str" + it.next() + "String_Node_Str");
        }
      }
      if (receiverList.hasRemoteReceivers()) {
        sb.append("String_Node_Str");
        final Iterator<RemoteReceiver> it=receiverList.getRemoteReceivers().iterator();
        while (it.hasNext()) {
          sb.append("String_Node_Str" + it.next() + "String_Node_Str");
        }
      }
      LOG.debug(sb.toString());
    }
  }
  return receiverList;
}