Program: 89777
Project: 89777
Buggy source:
/** 
 * Retrieves the checksum of a specific file. This is the checksum archive alternative to running a ChecksumJob  limited to a specific file.
 * @param replicaId The ID of the replica to send the message.
 * @param filename The name of the file for whom the checksum should beretrieved.
 * @return The checksum of the file in the replica. 
 * @throws IOFailure If the reply is not of type GetChecksumMessage. Or ifthe message timed out.
 * @throws ArgumentNotValid If either the replicaId of the filename is null or empty. 
 */
public String getChecksum(String replicaId,String filename) throws ArgumentNotValid, IOFailure {
  ArgumentNotValid.checkNotNullOrEmpty(replicaId,"String_Node_Str");
  ArgumentNotValid.checkNotNullOrEmpty(filename,"String_Node_Str");
  log.debug("String_Node_Str" + replicaId + "String_Node_Str"+ filename+ "String_Node_Str");
  long start=System.currentTimeMillis();
  GetChecksumMessage gcsMsg=new GetChecksumMessage(Channels.getTheRepos(),replyQ,filename,replicaId);
  NetarkivetMessage replyNetMsg=sendAndWaitForOneReply(gcsMsg,getTimeout);
  long timePassed=System.currentTimeMillis() - start;
  log.debug("String_Node_Str" + (timePassed / MILLISECONDS_PER_SECOND) + "String_Node_Str");
  if (replyNetMsg == null) {
    throw new IOFailure("String_Node_Str" + (getTimeout / MILLISECONDS_PER_SECOND) + "String_Node_Str");
  }
  GetChecksumMessage replyCSMsg;
  try {
    replyCSMsg=(GetChecksumMessage)replyNetMsg;
  }
 catch (  ClassCastException e) {
    throw new IOFailure("String_Node_Str" + replyNetMsg,e);
  }
  if (!replyCSMsg.isOk()) {
    log.warn("String_Node_Str" + "String_Node_Str" + replyCSMsg.getErrMsg());
  }
  return replyCSMsg.getChecksum();
}

Fixed version (ground truth):
/** 
 * Retrieves the checksum of a specific file. This is the checksum archive alternative to running a ChecksumJob  limited to a specific file.
 * @param replicaId The ID of the replica to send the message.
 * @param filename The name of the file for whom the checksum should beretrieved.
 * @return The checksum of the file in the replica. 
 * @throws IOFailure If the reply is not of type GetChecksumMessage. Or ifthe message timed out.
 * @throws ArgumentNotValid If either the replicaId of the filename is null or empty. 
 */
public String getChecksum(String replicaId,String filename) throws ArgumentNotValid, IOFailure {
  ArgumentNotValid.checkNotNullOrEmpty(replicaId,"String_Node_Str");
  ArgumentNotValid.checkNotNullOrEmpty(filename,"String_Node_Str");
  log.debug("String_Node_Str" + replicaId + "String_Node_Str"+ filename+ "String_Node_Str");
  long start=System.currentTimeMillis();
  GetChecksumMessage gcsMsg=new GetChecksumMessage(Channels.getTheRepos(),replyQ,filename,replicaId);
  NetarkivetMessage replyNetMsg=sendAndWaitForOneReply(gcsMsg,0);
  long timePassed=System.currentTimeMillis() - start;
  log.debug("String_Node_Str" + (timePassed / MILLISECONDS_PER_SECOND) + "String_Node_Str");
  if (replyNetMsg == null) {
    throw new IOFailure("String_Node_Str" + (getTimeout / MILLISECONDS_PER_SECOND) + "String_Node_Str");
  }
  GetChecksumMessage replyCSMsg;
  try {
    replyCSMsg=(GetChecksumMessage)replyNetMsg;
  }
 catch (  ClassCastException e) {
    throw new IOFailure("String_Node_Str" + replyNetMsg,e);
  }
  if (!replyCSMsg.isOk()) {
    log.warn("String_Node_Str" + "String_Node_Str" + replyCSMsg.getErrMsg());
  }
  return replyCSMsg.getChecksum();
}