Program: 6135
Project: 6135
Buggy source:
/** 
 * Gets the fields that are queryable for a given time range and sourceID for combinable aggregation functions
 */
@Path("String_Node_Str") @GET public void fieldsGetter(HttpServiceRequest request,HttpServiceResponder responder,@PathParam("String_Node_Str") String sourceID,@QueryParam("String_Node_Str") @DefaultValue("String_Node_Str") long startTimestamp,@QueryParam("String_Node_Str") @DefaultValue("String_Node_Str") long endTimestamp) throws IOException {
  AggregationsRowKey aggregationsRowKeyStart=new AggregationsRowKey(startTimestamp,sourceID);
  AggregationsRowKey aggregationsRowKeyEnd=new AggregationsRowKey(endTimestamp + 1,sourceID);
  Scanner scanner=dataStore.scan(aggregationsRowKeyStart.getTableRowKey(),aggregationsRowKeyEnd.getTableRowKey());
  Row row;
  Map<String,FieldDetail> fieldDetailMap=new HashMap<>();
  try {
    while ((row=scanner.next()) != null) {
      Map<byte[],byte[]> columnsMapBytes=row.getColumns();
      List<FieldDetail> timestampSpecificFieldDetailList=new ArrayList<>();
      for (      Map.Entry<byte[],byte[]> columnMapEntry : columnsMapBytes.entrySet()) {
        String fieldName=Bytes.toString(columnMapEntry.getKey());
        byte[] output=columnMapEntry.getValue();
        String outputString=Bytes.toString(output);
        Set<AggregationTypeValue> aggregationTypeValuesSet=GSON.fromJson(outputString,TOKEN_TYPE_SET_AGGREGATION_TYPE_VALUES);
        FieldDetail fieldDetail=new FieldDetail(fieldName,aggregationTypeValuesSet);
        timestampSpecificFieldDetailList.add(fieldDetail);
      }
      for (      FieldDetail fdTimestampSpecific : timestampSpecificFieldDetailList) {
        String fdTimestampSpecificFieldName=fdTimestampSpecific.getFieldName();
        if (fieldDetailMap.containsKey(fdTimestampSpecificFieldName)) {
          FieldDetail fdCombined=fieldDetailMap.get(fdTimestampSpecificFieldName);
          fdCombined.addAggregations(fdTimestampSpecific.getAggregationTypeSet());
        }
 else {
          fieldDetailMap.put(fdTimestampSpecificFieldName,fdTimestampSpecific);
        }
      }
    }
  }
  finally {
    scanner.close();
  }
  if (fieldDetailMap.isEmpty()) {
    responder.sendString(HttpURLConnection.HTTP_NOT_FOUND,String.format("String_Node_Str",sourceID),Charsets.UTF_8);
  }
 else {
    responder.sendJson(HttpURLConnection.HTTP_OK,fieldDetailMap.values());
  }
}

Fixed version (ground truth):
/** 
 * Gets the fields that are queryable for a given time range and sourceID for combinable aggregation functions
 */
@Path("String_Node_Str") @GET public void fieldsGetter(HttpServiceRequest request,HttpServiceResponder responder,@PathParam("String_Node_Str") String sourceID,@QueryParam("String_Node_Str") @DefaultValue("String_Node_Str") long startTimestamp,@QueryParam("String_Node_Str") @DefaultValue("String_Node_Str") long endTimestamp) throws IOException {
  AggregationsRowKey aggregationsRowKeyStart=new AggregationsRowKey(startTimestamp,sourceID);
  AggregationsRowKey aggregationsRowKeyEnd=new AggregationsRowKey(endTimestamp + 1,sourceID);
  Row row;
  Map<String,FieldDetail> fieldDetailMap=new HashMap<>();
  try (Scanner scanner=dataStore.scan(aggregationsRowKeyStart.getTableRowKey(),aggregationsRowKeyEnd.getTableRowKey())){
    while ((row=scanner.next()) != null) {
      Map<byte[],byte[]> columnsMapBytes=row.getColumns();
      List<FieldDetail> timestampSpecificFieldDetailList=new ArrayList<>();
      for (      Map.Entry<byte[],byte[]> columnMapEntry : columnsMapBytes.entrySet()) {
        String fieldName=Bytes.toString(columnMapEntry.getKey());
        byte[] output=columnMapEntry.getValue();
        String outputString=Bytes.toString(output);
        Set<AggregationTypeValue> aggregationTypeValuesSet=GSON.fromJson(outputString,TOKEN_TYPE_SET_AGGREGATION_TYPE_VALUES);
        FieldDetail fieldDetail=new FieldDetail(fieldName,aggregationTypeValuesSet);
        timestampSpecificFieldDetailList.add(fieldDetail);
      }
      for (      FieldDetail fdTimestampSpecific : timestampSpecificFieldDetailList) {
        String fdTimestampSpecificFieldName=fdTimestampSpecific.getFieldName();
        if (fieldDetailMap.containsKey(fdTimestampSpecificFieldName)) {
          FieldDetail fdCombined=fieldDetailMap.get(fdTimestampSpecificFieldName);
          fdCombined.addAggregations(fdTimestampSpecific.getAggregationTypeSet());
        }
 else {
          fieldDetailMap.put(fdTimestampSpecificFieldName,fdTimestampSpecific);
        }
      }
    }
  }
   if (fieldDetailMap.isEmpty()) {
    responder.sendString(HttpURLConnection.HTTP_NOT_FOUND,String.format("String_Node_Str",sourceID),Charsets.UTF_8);
  }
 else {
    responder.sendJson(HttpURLConnection.HTTP_OK,fieldDetailMap.values());
  }
}