Program: 130264
Project: 130264
Buggy source:
/** 
 * Adds detail for a Map phase.
 * @param task2 
 * @param task2 the tasks
 * @param referencedZeroTime 
 * @param referencedZeroTime the start time
 * @param additionalJobInfo 
 * @return the phase details
 */
private TaskOutputDetails addMapPhaseDetails(Entry<TaskAttemptID,TaskAttemptInfo> task,long referencedZeroTime){
  TaskAttemptInfo taskAttemptInfo=(TaskAttemptInfo)(task.getValue());
  TaskOutputDetails taskOutputDetails=new TaskOutputDetails();
  taskOutputDetails.setTaskStatus(taskAttemptInfo.getTaskStatus());
  taskOutputDetails.setTaskType(taskAttemptInfo.getTaskType().toString());
  taskOutputDetails.setTaskID(taskAttemptInfo.getAttemptId().getTaskID().toString());
  long startPoint=(taskAttemptInfo.getStartTime() - referencedZeroTime) / CONVERSION_FACTOR_MILLISECS_TO_SECS;
  taskOutputDetails.setStartPoint(startPoint);
  LOGGER.info("String_Node_Str" + taskOutputDetails.getStartPoint());
  long endPoint=(taskAttemptInfo.getMapFinishTime() - referencedZeroTime) / CONVERSION_FACTOR_MILLISECS_TO_SECS;
  taskOutputDetails.setEndPoint(endPoint);
  LOGGER.info("String_Node_Str" + taskOutputDetails.getEndPoint());
  taskOutputDetails.setTimeTaken(endPoint - startPoint);
  LOGGER.info("String_Node_Str" + taskOutputDetails.getTimeTaken());
  taskOutputDetails.setLocation(taskAttemptInfo.getHostname());
  Counters counters=taskAttemptInfo.getCounters();
  CounterGroup fileSystemCounters=counters.getGroup("String_Node_Str");
  Counter inputBytes=fileSystemCounters.findCounter("String_Node_Str");
  long dataFlowRate=inputBytes.getValue() / (endPoint - startPoint);
  taskOutputDetails.setDataFlowRate(dataFlowRate);
  CounterGroup mapReduceTaskCounters=counters.getGroup("String_Node_Str");
  Counter mapOutputRecords=mapReduceTaskCounters.findCounter("String_Node_Str");
  Counter physicalMemoryBytes=mapReduceTaskCounters.findCounter("String_Node_Str");
  ResourceUsageMetrics rum=new ResourceUsageMetrics();
  rum.setPhysicalMemoryUsage(physicalMemoryBytes.getValue());
  taskOutputDetails.setResourceUsageMetrics(rum);
  taskOutputDetails.setOutputRecords(mapOutputRecords.getValue());
  Counter mapOutputBytes=mapReduceTaskCounters.findCounter("String_Node_Str");
  taskOutputDetails.setOutputBytes(mapOutputBytes.getValue());
  return taskOutputDetails;
}

Fixed version (ground truth):
/** 
 * Adds detail for a Map phase.
 * @param task2 
 * @param task2 the tasks
 * @param referencedZeroTime 
 * @param referencedZeroTime the start time
 * @param additionalJobInfo 
 * @return the phase details
 */
private TaskOutputDetails addMapPhaseDetails(Entry<TaskAttemptID,TaskAttemptInfo> task,long referencedZeroTime){
  TaskAttemptInfo taskAttemptInfo=(TaskAttemptInfo)(task.getValue());
  TaskOutputDetails taskOutputDetails=new TaskOutputDetails();
  taskOutputDetails.setTaskStatus(taskAttemptInfo.getTaskStatus());
  taskOutputDetails.setTaskType(taskAttemptInfo.getTaskType().toString());
  taskOutputDetails.setTaskID(taskAttemptInfo.getAttemptId().getTaskID().toString());
  long startPoint=(taskAttemptInfo.getStartTime() - referencedZeroTime) / CONVERSION_FACTOR_MILLISECS_TO_SECS;
  taskOutputDetails.setStartPoint(startPoint);
  long endPoint=(taskAttemptInfo.getMapFinishTime() - referencedZeroTime) / CONVERSION_FACTOR_MILLISECS_TO_SECS;
  taskOutputDetails.setEndPoint(endPoint);
  taskOutputDetails.setTimeTaken(endPoint - startPoint);
  taskOutputDetails.setLocation(taskAttemptInfo.getHostname());
  Counters counters=taskAttemptInfo.getCounters();
  CounterGroup fileSystemCounters=counters.getGroup("String_Node_Str");
  Counter inputBytes=fileSystemCounters.findCounter("String_Node_Str");
  long dataFlowRate=inputBytes.getValue() / (endPoint - startPoint);
  taskOutputDetails.setDataFlowRate(dataFlowRate);
  CounterGroup mapReduceTaskCounters=counters.getGroup("String_Node_Str");
  Counter mapOutputRecords=mapReduceTaskCounters.findCounter("String_Node_Str");
  Counter physicalMemoryBytes=mapReduceTaskCounters.findCounter("String_Node_Str");
  ResourceUsageMetrics rum=new ResourceUsageMetrics();
  rum.setPhysicalMemoryUsage(physicalMemoryBytes.getValue());
  taskOutputDetails.setResourceUsageMetrics(rum);
  taskOutputDetails.setOutputRecords(mapOutputRecords.getValue());
  Counter mapOutputBytes=mapReduceTaskCounters.findCounter("String_Node_Str");
  taskOutputDetails.setOutputBytes(mapOutputBytes.getValue());
  return taskOutputDetails;
}