Program: 18617
Project: 18617
Buggy source:
private static AbstractDataTable createChartDataTable(List<TimeSlotData> timeDataRange,long aggregationPeriod,int hourSpan){
  int plotPointsPerHour=1;
  if (aggregationPeriod < 3600) {
    plotPointsPerHour=(int)(3600 / aggregationPeriod);
  }
  DataTable data=DataTable.create();
  TimeSlotData firstDateRange=timeDataRange.get(0);
  TimeSlotData secondDateRange=timeDataRange.get(1);
  if (firstDateRange.getReturnData() != null && secondDateRange.getReturnData() != null) {
    int rowSize=hourSpan;
    double[] firstDateRangeArray=calculatePlotPointsPerTimeUnit(firstDateRange.getReturnData(),plotPointsPerHour,hourSpan);
    double[] secondDateRangeArray=calculatePlotPointsPerTimeUnit(secondDateRange.getReturnData(),plotPointsPerHour,hourSpan);
    String[] labelArray=calculateDateTimeLabelPerTimeUnit(firstDateRange.getReturnData(),plotPointsPerHour,hourSpan);
    if (rowSize > 0) {
      data.addColumn(ColumnType.STRING,"String_Node_Str");
      data.addColumn(ColumnType.NUMBER,ConsoleUtil.shotTimeFormat.format(new Date(firstDateRange.getReturnData().get(0).getTimeSlot())));
      data.addColumn(ColumnType.NUMBER,ConsoleUtil.shotTimeFormat.format(new Date(secondDateRange.getReturnData().get(0).getTimeSlot())));
      data.addRows(rowSize);
      for (int i=0; i < rowSize; i++) {
        data.setValue(i,0,labelArray[i]);
        data.setValue(i,1,firstDateRangeArray[i]);
        data.setValue(i,2,secondDateRangeArray[i]);
      }
    }
 else {
      data.addColumn(ColumnType.STRING,"String_Node_Str");
      data.addColumn(ColumnType.NUMBER,"String_Node_Str");
      data.addColumn(ColumnType.NUMBER,"String_Node_Str");
      data.addRows(rowSize);
    }
  }
  return data;
}

Fixed version (ground truth):
private static AbstractDataTable createChartDataTable(List<? extends TimeSlotData> timeDataRange,long aggregationPeriod,int hourSpan){
  int plotPointsPerHour=1;
  if (aggregationPeriod < 3600) {
    plotPointsPerHour=(int)(3600 / aggregationPeriod);
  }
  DataTable data=DataTable.create();
  TimeSlotData firstDateRange=timeDataRange.get(0);
  TimeSlotData secondDateRange=timeDataRange.get(1);
  if (firstDateRange.getReturnData() != null && secondDateRange.getReturnData() != null) {
    int rowSize=hourSpan;
    double[] firstDateRangeArray=calculatePlotPointsPerTimeUnit(firstDateRange.getReturnData(),plotPointsPerHour,hourSpan);
    double[] secondDateRangeArray=calculatePlotPointsPerTimeUnit(secondDateRange.getReturnData(),plotPointsPerHour,hourSpan);
    String[] labelArray=calculateDateTimeLabelPerTimeUnit(firstDateRange.getReturnData(),plotPointsPerHour,hourSpan);
    if (rowSize > 0) {
      data.addColumn(ColumnType.STRING,"String_Node_Str");
      data.addColumn(ColumnType.NUMBER,ConsoleUtil.shotTimeFormat.format(new Date(firstDateRange.getReturnData().get(0).getTimeSlot())));
      data.addColumn(ColumnType.NUMBER,ConsoleUtil.shotTimeFormat.format(new Date(secondDateRange.getReturnData().get(0).getTimeSlot())));
      data.addRows(rowSize);
      for (int i=0; i < rowSize; i++) {
        data.setValue(i,0,labelArray[i]);
        data.setValue(i,1,firstDateRangeArray[i]);
        data.setValue(i,2,secondDateRangeArray[i]);
      }
    }
 else {
      data.addColumn(ColumnType.STRING,"String_Node_Str");
      data.addColumn(ColumnType.NUMBER,"String_Node_Str");
      data.addColumn(ColumnType.NUMBER,"String_Node_Str");
      data.addRows(rowSize);
    }
  }
  return data;
}