Program: 52983
Project: 52983
Buggy source:
/** 
 * gets a PageViewDataStruct containing page view info for one hour beginning with current date then increments currentDate by an hour so that this method will get page view info for the next hour next time it's called
 * @return PageViewDataStruct for the current hour, or null if currentDate isn't more recent than endDate
 * @throws WikapidiaException
 * @throws DaoException
 */
private PageViewDataStruct getPageViewData() throws WikapidiaException, DaoException, ConfigurationException {
  if (currentDate.getMillis() >= endDate.getMillis()) {
    return null;
  }
  File tempFolder=new File("String_Node_Str" + lang.getLangCode() + "String_Node_Str");
  if (!tempFolder.exists()) {
    tempFolder.mkdir();
  }
  String yearString=((Integer)currentDate.getYear()).toString();
  String monthString=twoDigIntStr(currentDate.getMonthOfYear());
  String dayString=twoDigIntStr(currentDate.getDayOfMonth());
  String hourString=twoDigIntStr(currentDate.getHourOfDay());
  String fileName="String_Node_Str" + yearString + monthString+ dayString+ "String_Node_Str"+ hourString;
  String fileNameSuffix="String_Node_Str";
  String homeFolder=BASE_URL + String.format("String_Node_Str",yearString,yearString,monthString);
  File pageViewDataFile=null;
  int minutes=0;
  while (pageViewDataFile == null && minutes < 60) {
    int seconds=0;
    while (pageViewDataFile == null && seconds < 60) {
      String minutesString=twoDigIntStr(minutes);
      String secondsString=twoDigIntStr(seconds);
      fileName+=minutesString + secondsString + fileNameSuffix;
      pageViewDataFile=downloadFile(homeFolder,fileName,tempFolder);
      seconds++;
    }
    minutes++;
  }
  TIntIntMap pageViewCounts=parsePageViewDataFromFile(lang,pageViewDataFile);
  DateTime nextDate=currentDate.plusHours(1);
  PageViewDataStruct pageViewData=new PageViewDataStruct(lang,currentDate,nextDate,pageViewCounts);
  currentDate=nextDate;
  return pageViewData;
}

Fixed version (ground truth):
/** 
 * gets a PageViewDataStruct containing page view info for one hour beginning with current date then increments currentDate by an hour so that this method will get page view info for the next hour next time it's called
 * @return PageViewDataStruct for the current hour, or null if currentDate isn't more recent than endDate
 * @throws WikapidiaException
 * @throws DaoException
 */
private PageViewDataStruct getPageViewData() throws WikapidiaException, DaoException, ConfigurationException {
  if (currentDate.getMillis() >= endDate.getMillis()) {
    return null;
  }
  File tempFolder=new File("String_Node_Str" + lang.getLangCode() + "String_Node_Str");
  if (!tempFolder.exists()) {
    tempFolder.mkdir();
  }
  String yearString=((Integer)currentDate.getYear()).toString();
  String monthString=twoDigIntStr(currentDate.getMonthOfYear());
  String dayString=twoDigIntStr(currentDate.getDayOfMonth());
  String hourString=twoDigIntStr(currentDate.getHourOfDay());
  String fileNameSuffix="String_Node_Str";
  String homeFolder=BASE_URL + String.format("String_Node_Str",yearString,yearString,monthString);
  File pageViewDataFile=null;
  int minutes=0;
  while (pageViewDataFile == null && minutes < 60) {
    int seconds=0;
    while (pageViewDataFile == null && seconds < 60) {
      String minutesString=twoDigIntStr(minutes);
      String secondsString=twoDigIntStr(seconds);
      String fileName="String_Node_Str" + yearString + monthString+ dayString+ "String_Node_Str"+ hourString+ minutesString+ secondsString+ fileNameSuffix;
      pageViewDataFile=downloadFile(homeFolder,fileName,tempFolder);
      seconds++;
    }
    minutes++;
  }
  TIntIntMap pageViewCounts=parsePageViewDataFromFile(lang,pageViewDataFile);
  DateTime nextDate=currentDate.plusHours(1);
  PageViewDataStruct pageViewData=new PageViewDataStruct(lang,currentDate,nextDate,pageViewCounts);
  currentDate=nextDate;
  return pageViewData;
}