Program: 141047
Project: 141047
Buggy source:
/** 
 * Read a step result file.
 * @param in the input stream to read
 * @throws IOException if an error occurs while reading the file
 */
public void read(final InputStream in){
  checkNotNull(in);
  checkImmutableState();
  final JsonReader reader=Json.createReader(new InputStreamReader(in));
  final JsonObject obj=reader.readObject();
  this.jobId=obj.getString(JOB_ID_TAG);
  this.jobUUID=obj.getString(JOB_UUID_TAG);
  this.jobDescription=obj.getString(JOB_DESCRIPTION_TAG);
  this.jobEnvironment=obj.getString(JOB_ENVIRONMENT_TAG);
  this.stepId=obj.getString(STEP_ID_TAG);
  this.stepName=obj.getString(STEP_NAME_TAG);
  this.stepClass=obj.getString(STEP_CLASS_TAG);
  this.stepVersion=new Version(obj.getString(STEP_VERSION_TAG));
  this.startTime=parseDate(obj.getString(START_TIME_TAG));
  this.endTime=parseDate(obj.getString(END_TIME_TAG));
  this.duration=obj.getInt(DURATION_IN_MILLISECONDS_TAG);
  this.success=obj.getBoolean(SUCCESS_TAG);
  this.stepMessage=obj.getString(STEP_MESSAGE_TAG);
  System.out.println(this.startTime);
  this.parameters=new LinkedHashSet<>();
  final JsonObject parametersObj=obj.getJsonObject(STEP_PARAMETERS_TAG);
  for (  String key : parametersObj.keySet()) {
    this.parameters.add(new Parameter(key,parametersObj.getString(key)));
  }
  final JsonObject countersObj=obj.getJsonObject(COUNTERS_TAG);
  for (  String group : countersObj.keySet()) {
    if (!this.counters.containsKey(group)) {
      this.counters.put(group,new HashMap<String,Long>());
    }
    final Map<String,Long> map=this.counters.get(group);
    JsonObject groupObj=countersObj.getJsonObject(group);
    for (    String counterName : groupObj.keySet()) {
      map.put(counterName,groupObj.getJsonNumber(counterName).longValue());
    }
  }
  final JsonArray tasksArray=obj.getJsonArray(TASKS_TAG);
  for (  JsonValue entry : tasksArray) {
    final JsonObject entryObj=(JsonObject)entry;
    final int taskId=entryObj.getInt(TASK_ID_TAG);
    this.taskNames.put(taskId,entryObj.getString(TASK_NAME_TAG));
    this.taskDescriptions.put(taskId,entryObj.getString(TASK_DESCRIPTION_TAG));
    this.taskMessages.put(taskId,entryObj.getString(TASK_MESSAGE_TAG));
    final Map<String,Long> map=new HashMap<>();
    this.taskCounters.put(taskId,map);
    final JsonObject taskCountersObj=entryObj.getJsonObject(TASK_COUNTERS_TAG);
    for (    String counterName : taskCountersObj.keySet()) {
      map.put(counterName,taskCountersObj.getJsonNumber(counterName).longValue());
    }
  }
}

Fixed version (ground truth):
/** 
 * Read a step result file.
 * @param in the input stream to read
 */
public void read(final InputStream in){
  checkNotNull(in);
  checkImmutableState();
  final JsonReader reader=Json.createReader(new InputStreamReader(in));
  final JsonObject obj=reader.readObject();
  this.jobId=obj.getString(JOB_ID_TAG);
  this.jobUUID=obj.getString(JOB_UUID_TAG);
  this.jobDescription=obj.getString(JOB_DESCRIPTION_TAG);
  this.jobEnvironment=obj.getString(JOB_ENVIRONMENT_TAG);
  this.stepId=obj.getString(STEP_ID_TAG);
  this.stepName=obj.getString(STEP_NAME_TAG);
  this.stepClass=obj.getString(STEP_CLASS_TAG);
  this.stepVersion=new Version(obj.getString(STEP_VERSION_TAG));
  this.startTime=parseDate(obj.getString(START_TIME_TAG));
  this.endTime=parseDate(obj.getString(END_TIME_TAG));
  this.duration=obj.getInt(DURATION_IN_MILLISECONDS_TAG);
  this.success=obj.getBoolean(SUCCESS_TAG);
  this.stepMessage=obj.getString(STEP_MESSAGE_TAG);
  System.out.println(this.startTime);
  this.parameters=new LinkedHashSet<>();
  final JsonObject parametersObj=obj.getJsonObject(STEP_PARAMETERS_TAG);
  for (  String key : parametersObj.keySet()) {
    this.parameters.add(new Parameter(key,parametersObj.getString(key)));
  }
  final JsonObject countersObj=obj.getJsonObject(COUNTERS_TAG);
  for (  String group : countersObj.keySet()) {
    if (!this.counters.containsKey(group)) {
      this.counters.put(group,new HashMap<String,Long>());
    }
    final Map<String,Long> map=this.counters.get(group);
    JsonObject groupObj=countersObj.getJsonObject(group);
    for (    String counterName : groupObj.keySet()) {
      map.put(counterName,groupObj.getJsonNumber(counterName).longValue());
    }
  }
  final JsonArray tasksArray=obj.getJsonArray(TASKS_TAG);
  for (  JsonValue entry : tasksArray) {
    final JsonObject entryObj=(JsonObject)entry;
    final int taskId=entryObj.getInt(TASK_ID_TAG);
    this.taskNames.put(taskId,entryObj.getString(TASK_NAME_TAG));
    this.taskDescriptions.put(taskId,entryObj.getString(TASK_DESCRIPTION_TAG));
    this.taskMessages.put(taskId,entryObj.getString(TASK_MESSAGE_TAG));
    final Map<String,Long> map=new HashMap<>();
    this.taskCounters.put(taskId,map);
    final JsonObject taskCountersObj=entryObj.getJsonObject(TASK_COUNTERS_TAG);
    for (    String counterName : taskCountersObj.keySet()) {
      map.put(counterName,taskCountersObj.getJsonNumber(counterName).longValue());
    }
  }
}