Program: 17274
Project: 17274
Buggy source:
@Override public List<Event> initialize(TezRootInputInitializerContext rootInputContext) throws IOException {
  Stopwatch sw=null;
  if (LOG.isDebugEnabled()) {
    sw=new Stopwatch().start();
  }
  MRInputUserPayloadProto userPayloadProto=MRHelpers.parseMRInputPayload(rootInputContext.getUserPayload());
  if (LOG.isDebugEnabled()) {
    sw.stop();
    LOG.debug("String_Node_Str" + sw.elapsedMillis());
  }
  Configuration conf=MRHelpers.createConfFromByteString(userPayloadProto.getConfigurationBytes());
  JobConf jobConf=new JobConf(conf);
  boolean useNewApi=jobConf.getUseNewMapper();
  sendSerializedEvents=conf.getBoolean(MRJobConfig.MR_TEZ_INPUT_INITIALIZER_SERIALIZE_EVENT_PAYLAOD,MRJobConfig.MR_TEZ_INPUT_INITIALIZER_SERIALIZE_EVENT_PAYLAOD_DEFAULT);
  LOG.info("String_Node_Str" + sendSerializedEvents);
  this.splitsProto=userPayloadProto.getSplits();
  MRInputUserPayloadProto.Builder updatedPayloadBuilder=MRInputUserPayloadProto.newBuilder(userPayloadProto);
  updatedPayloadBuilder.clearSplits();
  List<Event> events=Lists.newArrayListWithCapacity(this.splitsProto.getSplitsCount() + 1);
  RootInputUpdatePayloadEvent updatePayloadEvent=new RootInputUpdatePayloadEvent(updatedPayloadBuilder.build().toByteArray());
  events.add(updatePayloadEvent);
  int count=0;
  for (  MRSplitProto mrSplit : this.splitsProto.getSplitsList()) {
    RootInputDataInformationEvent diEvent;
    if (sendSerializedEvents) {
      diEvent=new RootInputDataInformationEvent(count++,mrSplit.toByteArray());
    }
 else {
      if (useNewApi) {
        org.apache.hadoop.mapreduce.InputSplit newInputSplit=MRInput.getNewSplitDetailsFromEvent(mrSplit,conf);
        diEvent=new RootInputDataInformationEvent(count++,newInputSplit);
      }
 else {
        org.apache.hadoop.mapred.InputSplit oldInputSplit=MRInput.getOldSplitDetailsFromEvent(mrSplit,conf);
        diEvent=new RootInputDataInformationEvent(count++,oldInputSplit);
      }
      events.add(diEvent);
    }
  }
  return events;
}

Fixed version (ground truth):
@Override public List<Event> initialize(TezRootInputInitializerContext rootInputContext) throws IOException {
  Stopwatch sw=null;
  if (LOG.isDebugEnabled()) {
    sw=new Stopwatch().start();
  }
  MRInputUserPayloadProto userPayloadProto=MRHelpers.parseMRInputPayload(rootInputContext.getUserPayload());
  if (LOG.isDebugEnabled()) {
    sw.stop();
    LOG.debug("String_Node_Str" + sw.elapsedMillis());
  }
  Configuration conf=MRHelpers.createConfFromByteString(userPayloadProto.getConfigurationBytes());
  JobConf jobConf=new JobConf(conf);
  boolean useNewApi=jobConf.getUseNewMapper();
  sendSerializedEvents=conf.getBoolean(MRJobConfig.MR_TEZ_INPUT_INITIALIZER_SERIALIZE_EVENT_PAYLAOD,MRJobConfig.MR_TEZ_INPUT_INITIALIZER_SERIALIZE_EVENT_PAYLAOD_DEFAULT);
  LOG.info("String_Node_Str" + sendSerializedEvents);
  this.splitsProto=userPayloadProto.getSplits();
  MRInputUserPayloadProto.Builder updatedPayloadBuilder=MRInputUserPayloadProto.newBuilder(userPayloadProto);
  updatedPayloadBuilder.clearSplits();
  List<Event> events=Lists.newArrayListWithCapacity(this.splitsProto.getSplitsCount() + 1);
  RootInputUpdatePayloadEvent updatePayloadEvent=new RootInputUpdatePayloadEvent(updatedPayloadBuilder.build().toByteArray());
  events.add(updatePayloadEvent);
  int count=0;
  for (  MRSplitProto mrSplit : this.splitsProto.getSplitsList()) {
    RootInputDataInformationEvent diEvent;
    if (sendSerializedEvents) {
      diEvent=new RootInputDataInformationEvent(count++,mrSplit.toByteArray());
    }
 else {
      if (useNewApi) {
        org.apache.hadoop.mapreduce.InputSplit newInputSplit=MRInput.getNewSplitDetailsFromEvent(mrSplit,conf);
        diEvent=new RootInputDataInformationEvent(count++,newInputSplit);
      }
 else {
        org.apache.hadoop.mapred.InputSplit oldInputSplit=MRInput.getOldSplitDetailsFromEvent(mrSplit,conf);
        diEvent=new RootInputDataInformationEvent(count++,oldInputSplit);
      }
    }
    events.add(diEvent);
  }
  return events;
}