Program: 17296
Project: 17296
Buggy source:
@Override public List<Event> initialize(TezInputContext inputContext) throws IOException {
  Configuration conf=TezUtils.createConfFromUserPayload(inputContext.getUserPayload());
  this.jobConf=new JobConf(conf);
  TaskSplitMetaInfo[] allMetaInfo=readSplits(conf);
  TaskSplitMetaInfo thisTaskMetaInfo=allMetaInfo[inputContext.getTaskIndex()];
  this.splitMetaInfo=new TaskSplitIndex(thisTaskMetaInfo.getSplitLocation(),thisTaskMetaInfo.getStartOffset());
  this.inputRecordCounter=inputContext.getCounters().findCounter(TaskCounter.MAP_INPUT_RECORDS);
  this.fileInputByteCounter=inputContext.getCounters().findCounter(FileInputFormatCounter.BYTES_READ);
  useNewApi=this.jobConf.getUseNewMapper();
  if (useNewApi) {
    TaskAttemptContext taskAttemptContext=createTaskAttemptContext();
    Class<? extends org.apache.hadoop.mapreduce.InputFormat<?,?>> inputFormatClazz;
    try {
      inputFormatClazz=taskAttemptContext.getInputFormatClass();
    }
 catch (    ClassNotFoundException e) {
      throw new IOException("String_Node_Str",e);
    }
    newInputFormat=ReflectionUtils.newInstance(inputFormatClazz,this.jobConf);
    newInputSplit=getNewSplitDetails(splitMetaInfo);
    List<Statistics> matchedStats=null;
    if (newInputSplit instanceof org.apache.hadoop.mapreduce.lib.input.FileSplit) {
      matchedStats=Utils.getFsStatistics(((org.apache.hadoop.mapreduce.lib.input.FileSplit)newInputSplit).getPath(),this.jobConf);
    }
    fsStats=matchedStats;
    try {
      newRecordReader=newInputFormat.createRecordReader(newInputSplit,taskAttemptContext);
      newRecordReader.initialize(newInputSplit,taskAttemptContext);
    }
 catch (    InterruptedException e) {
      throw new IOException("String_Node_Str",e);
    }
  }
 else {
    oldInputFormat=this.jobConf.getInputFormat();
    InputSplit oldInputSplit=getOldSplitDetails(splitMetaInfo);
    List<Statistics> matchedStats=null;
    if (oldInputSplit instanceof FileSplit) {
      matchedStats=Utils.getFsStatistics(((FileSplit)oldInputSplit).getPath(),this.jobConf);
    }
    fsStats=matchedStats;
    long bytesInPrev=getInputBytes();
    oldRecordReader=oldInputFormat.getRecordReader(oldInputSplit,this.jobConf,new MRReporter(inputContext,oldInputSplit));
    long bytesInCurr=getInputBytes();
    fileInputByteCounter.increment(bytesInCurr - bytesInPrev);
    setIncrementalConfigParams(oldInputSplit);
  }
  return null;
}

Fixed version (ground truth):
@Override public List<Event> initialize(TezInputContext inputContext) throws IOException {
  this.inputContext=inputContext;
  Configuration conf=TezUtils.createConfFromUserPayload(inputContext.getUserPayload());
  this.jobConf=new JobConf(conf);
  TaskSplitMetaInfo[] allMetaInfo=readSplits(conf);
  TaskSplitMetaInfo thisTaskMetaInfo=allMetaInfo[inputContext.getTaskIndex()];
  this.splitMetaInfo=new TaskSplitIndex(thisTaskMetaInfo.getSplitLocation(),thisTaskMetaInfo.getStartOffset());
  this.inputRecordCounter=inputContext.getCounters().findCounter(TaskCounter.MAP_INPUT_RECORDS);
  this.fileInputByteCounter=inputContext.getCounters().findCounter(FileInputFormatCounter.BYTES_READ);
  useNewApi=this.jobConf.getUseNewMapper();
  if (useNewApi) {
    TaskAttemptContext taskAttemptContext=createTaskAttemptContext();
    Class<? extends org.apache.hadoop.mapreduce.InputFormat<?,?>> inputFormatClazz;
    try {
      inputFormatClazz=taskAttemptContext.getInputFormatClass();
    }
 catch (    ClassNotFoundException e) {
      throw new IOException("String_Node_Str",e);
    }
    newInputFormat=ReflectionUtils.newInstance(inputFormatClazz,this.jobConf);
    newInputSplit=getNewSplitDetails(splitMetaInfo);
    List<Statistics> matchedStats=null;
    if (newInputSplit instanceof org.apache.hadoop.mapreduce.lib.input.FileSplit) {
      matchedStats=Utils.getFsStatistics(((org.apache.hadoop.mapreduce.lib.input.FileSplit)newInputSplit).getPath(),this.jobConf);
    }
    fsStats=matchedStats;
    try {
      newRecordReader=newInputFormat.createRecordReader(newInputSplit,taskAttemptContext);
      newRecordReader.initialize(newInputSplit,taskAttemptContext);
    }
 catch (    InterruptedException e) {
      throw new IOException("String_Node_Str",e);
    }
  }
 else {
    oldInputFormat=this.jobConf.getInputFormat();
    InputSplit oldInputSplit=getOldSplitDetails(splitMetaInfo);
    List<Statistics> matchedStats=null;
    if (oldInputSplit instanceof FileSplit) {
      matchedStats=Utils.getFsStatistics(((FileSplit)oldInputSplit).getPath(),this.jobConf);
    }
    fsStats=matchedStats;
    long bytesInPrev=getInputBytes();
    oldRecordReader=oldInputFormat.getRecordReader(oldInputSplit,this.jobConf,new MRReporter(inputContext,oldInputSplit));
    long bytesInCurr=getInputBytes();
    fileInputByteCounter.increment(bytesInCurr - bytesInPrev);
    setIncrementalConfigParams(oldInputSplit);
  }
  return null;
}