Program: 37988
Project: 37988
Buggy source:
public void countTierLicenses(ArrayList<TimeRange> timeRanges){
  if (s.debugLevel >= 2)   logger.log(Level.INFO,new StringBuilder().append("String_Node_Str").toString());
  populateDotNetMap();
  for (  TierLicenseCount tCount : tierLicenses.values()) {
    tCount.countNodeLicenses(timeRanges,dotNetMap,dotNetKeys);
  }
  for (int i=0; i < timeRanges.size(); i++) {
    ApplicationLicenseRange aRange=new ApplicationLicenseRange();
    aRange.setStart(timeRanges.get(i).getStart());
    aRange.setEnd(timeRanges.get(i).getEnd());
    aRange.setName(aRange.createName());
    for (    TierLicenseCount tCount : tierLicenses.values()) {
      TierLicenseRange tRange=tCount.getTierLicenseRange().get(i);
      aRange.iisCount+=tRange.getIisCount();
      aRange.javaCount+=tRange.getJavaCount();
      aRange.nodeJSCount+=tRange.getNodeJSCount();
      aRange.machineCount+=tRange.getMachineCount();
      aRange.phpCount+=tRange.getPhpCount();
      aRange.totalCount+=tRange.getTotalCount();
      aRange.iisInternalCount+=tRange.iisInternalCount;
    }
    appLicenseRange.add(aRange);
  }
  ArrayList<TimeRange> hourlyTimeRanges=TimeRangeHelper.getHourlyTimeRanges(totalRangeValue.getStart(),totalRangeValue.getEnd());
  for (int i=0; i < hourlyTimeRanges.size(); i++) {
    AppHourLicenseRange app=new AppHourLicenseRange(hourlyTimeRanges.get(i));
    for (    TierLicenseCount tCount : tierLicenses.values()) {
      for (      TierHourLicenseRange tRange : tCount.getTierHourLicenseRange()) {
        if (app.withIn(tRange)) {
          app.appAgent+=tRange.appAgent;
          app.machineAgent+=tRange.machineAgent;
        }
      }
    }
    appHourLicenseRange.add(app);
  }
  for (  ApplicationLicenseRange tRange : appLicenseRange) {
    totalRangeValue.iisCount+=tRange.iisCount;
    totalRangeValue.javaCount+=tRange.javaCount;
    totalRangeValue.phpCount+=tRange.phpCount;
    totalRangeValue.nodeJSCount+=tRange.nodeJSCount;
    totalRangeValue.machineCount+=tRange.machineCount;
    totalRangeValue.totalCount+=tRange.totalCount;
    totalRangeValue.iisInternalCount+=tRange.iisInternalCount;
  }
}

Fixed version (ground truth):
public void countTierLicenses(ArrayList<TimeRange> timeRanges){
  if (s.debugLevel >= 2)   logger.log(Level.INFO,new StringBuilder().append("String_Node_Str").toString());
  populateDotNetMap();
  for (  TierLicenseCount tCount : tierLicenses.values()) {
    tCount.countNodeLicenses(timeRanges,dotNetMap,dotNetKeys);
  }
  for (int i=0; i < timeRanges.size(); i++) {
    ApplicationLicenseRange aRange=new ApplicationLicenseRange();
    aRange.setStart(timeRanges.get(i).getStart());
    aRange.setEnd(timeRanges.get(i).getEnd());
    aRange.setName(aRange.createName());
    for (    TierLicenseCount tCount : tierLicenses.values()) {
      TierLicenseRange tRange=tCount.getTierLicenseRange().get(i);
      aRange.iisCount+=tRange.getIisCount();
      aRange.javaCount+=tRange.getJavaCount();
      aRange.nodeJSCount+=tRange.getNodeJSCount();
      aRange.machineCount+=tRange.getMachineCount();
      aRange.phpCount+=tRange.getPhpCount();
      aRange.totalCount+=tRange.getTotalCount();
      aRange.iisInternalCount+=tRange.iisInternalCount;
      aRange.webserverCount+=tRange.webserverCount;
    }
    if (aRange.getNodeJSCount() > 0)     aRange.totalCount=(aRange.getTotalCount() - aRange.getNodeJSCount()) + licenseRound(aRange.getNodeJSCount() / 10);
    appLicenseRange.add(aRange);
  }
  ArrayList<TimeRange> hourlyTimeRanges=TimeRangeHelper.getHourlyTimeRanges(totalRangeValue.getStart(),totalRangeValue.getEnd());
  for (int i=0; i < hourlyTimeRanges.size(); i++) {
    AppHourLicenseRange app=new AppHourLicenseRange(hourlyTimeRanges.get(i));
    for (    TierLicenseCount tCount : tierLicenses.values()) {
      for (      TierHourLicenseRange tRange : tCount.getTierHourLicenseRange()) {
        if (app.withIn(tRange)) {
          app.appAgent+=tRange.appAgent;
          app.machineAgent+=tRange.machineAgent;
        }
      }
    }
    appHourLicenseRange.add(app);
  }
  for (  ApplicationLicenseRange tRange : appLicenseRange) {
    totalRangeValue.iisCount+=tRange.iisCount;
    totalRangeValue.javaCount+=tRange.javaCount;
    totalRangeValue.phpCount+=tRange.phpCount;
    totalRangeValue.nodeJSCount+=tRange.nodeJSCount;
    totalRangeValue.machineCount+=tRange.machineCount;
    totalRangeValue.totalCount+=tRange.totalCount;
    totalRangeValue.iisInternalCount+=tRange.iisInternalCount;
    totalRangeValue.webserverCount+=tRange.webserverCount;
  }
}