Program: 115419
Project: 115419
Buggy source:
public void handleError() throws Exception {
  short errorCode=fetchResponse.errorCode(consumerConfig.topic,currentPartition);
  logger.error("String_Node_Str",errorCode,currentPartition);
  if (errorCode == ErrorMapping.BrokerNotAvailableCode()) {
    logger.error("String_Node_Str",currentPartition);
    reInitKafka();
  }
 else   if (errorCode == ErrorMapping.InvalidFetchSizeCode()) {
    logger.error("String_Node_Str",currentPartition);
    reInitKafka();
  }
 else   if (errorCode == ErrorMapping.InvalidMessageCode()) {
    logger.error("String_Node_Str",currentPartition);
  }
 else   if (errorCode == ErrorMapping.LeaderNotAvailableCode()) {
    logger.error("String_Node_Str",currentPartition);
    reInitKafka();
  }
 else   if (errorCode == ErrorMapping.MessageSizeTooLargeCode()) {
    logger.error("String_Node_Str",currentPartition);
  }
 else   if (errorCode == ErrorMapping.NotLeaderForPartitionCode()) {
    logger.error("String_Node_Str",currentPartition);
    reInitKafka();
  }
 else   if (errorCode == ErrorMapping.OffsetMetadataTooLargeCode()) {
    logger.error("String_Node_Str",currentPartition);
  }
 else   if (errorCode == ErrorMapping.OffsetOutOfRangeCode()) {
    logger.error("String_Node_Str",currentPartition);
    return;
  }
 else   if (errorCode == ErrorMapping.ReplicaNotAvailableCode()) {
    logger.error("String_Node_Str",currentPartition);
    reInitKafka();
    return;
  }
 else   if (errorCode == ErrorMapping.RequestTimedOutCode()) {
    logger.error("String_Node_Str",currentPartition);
    reInitKafka();
    return;
  }
 else   if (errorCode == ErrorMapping.StaleControllerEpochCode()) {
    logger.error("String_Node_Str",currentPartition);
    return;
  }
 else   if (errorCode == ErrorMapping.StaleLeaderEpochCode()) {
    logger.error("String_Node_Str",currentPartition);
    return;
  }
 else   if (errorCode == ErrorMapping.UnknownCode()) {
    logger.error("String_Node_Str",currentPartition);
    reInitKafka();
    return;
  }
 else   if (errorCode == ErrorMapping.UnknownTopicOrPartitionCode()) {
    logger.error("String_Node_Str",currentPartition);
    reInitKafka();
    return;
  }
}

Fixed version (ground truth):
public void handleError() throws Exception {
  short errorCode=fetchResponse.errorCode(consumerConfig.topic,currentPartition);
  logger.error("String_Node_Str",errorCode,currentPartition);
  if (errorCode == ErrorMapping.BrokerNotAvailableCode()) {
    logger.error("String_Node_Str",currentPartition);
    reInitKafka();
  }
 else   if (errorCode == ErrorMapping.InvalidFetchSizeCode()) {
    logger.error("String_Node_Str",currentPartition);
    reInitKafka();
  }
 else   if (errorCode == ErrorMapping.InvalidMessageCode()) {
    logger.error("String_Node_Str",currentPartition);
  }
 else   if (errorCode == ErrorMapping.LeaderNotAvailableCode()) {
    logger.error("String_Node_Str",currentPartition);
    reInitKafka();
  }
 else   if (errorCode == ErrorMapping.MessageSizeTooLargeCode()) {
    logger.error("String_Node_Str",currentPartition);
  }
 else   if (errorCode == ErrorMapping.NotLeaderForPartitionCode()) {
    logger.error("String_Node_Str",currentPartition);
    reInitKafka();
  }
 else   if (errorCode == ErrorMapping.OffsetMetadataTooLargeCode()) {
    logger.error("String_Node_Str",currentPartition);
  }
 else   if (errorCode == ErrorMapping.OffsetOutOfRangeCode()) {
    logger.error("String_Node_Str",currentPartition,offsetForThisRound);
    long earliestOffset=kafkaConsumerClient.getEarliestOffset();
    logger.info("String_Node_Str",currentPartition,earliestOffset);
    offsetForThisRound=earliestOffset;
    try {
      kafkaConsumerClient.saveOffsetInKafka(earliestOffset,errorCode);
    }
 catch (    Exception e) {
      logger.error("String_Node_Str",currentPartition,e);
      throw e;
    }
    return;
  }
 else   if (errorCode == ErrorMapping.ReplicaNotAvailableCode()) {
    logger.error("String_Node_Str",currentPartition);
    reInitKafka();
    return;
  }
 else   if (errorCode == ErrorMapping.RequestTimedOutCode()) {
    logger.error("String_Node_Str",currentPartition);
    reInitKafka();
    return;
  }
 else   if (errorCode == ErrorMapping.StaleControllerEpochCode()) {
    logger.error("String_Node_Str",currentPartition);
    return;
  }
 else   if (errorCode == ErrorMapping.StaleLeaderEpochCode()) {
    logger.error("String_Node_Str",currentPartition);
    return;
  }
 else   if (errorCode == ErrorMapping.UnknownCode()) {
    logger.error("String_Node_Str",currentPartition);
    reInitKafka();
    return;
  }
 else   if (errorCode == ErrorMapping.UnknownTopicOrPartitionCode()) {
    logger.error("String_Node_Str",currentPartition);
    reInitKafka();
    return;
  }
}