Program: 14420
Project: 14420
Buggy source:
public ReportArtEntity generateReportArt(final ReportArtEntity report){
  log.debug("String_Node_Str");
  final Map<String,Long> snapshotEndTimes=new HashMap<String,Long>();
  foreachReportingSnapshotDeleteEvent(report.getEndMs(),new Predicate<ReportingVolumeSnapshotDeleteEvent>(){
    @Override public boolean apply(    final ReportingVolumeSnapshotDeleteEvent deleteEvent){
      snapshotEndTimes.put(deleteEvent.getUuid(),deleteEvent.getTimestampMs());
      return true;
    }
  }
);
  final Map<String,ReportingVolumeCreateEvent> volumeCreateEvents=new HashMap<String,ReportingVolumeCreateEvent>();
  foreachReportingVolumeCreateEvent(report.getEndMs(),new Predicate<ReportingVolumeCreateEvent>(){
    @Override public boolean apply(    final ReportingVolumeCreateEvent createEvent){
      volumeCreateEvents.put(createEvent.getUuid(),createEvent);
      return true;
    }
  }
);
  foreachReportingSnapshotCreateEvent(report.getEndMs(),new Predicate<ReportingVolumeSnapshotCreateEvent>(){
    @Override public boolean apply(    final ReportingVolumeSnapshotCreateEvent createEvent){
      long endTime=snapshotEndTimes.containsKey(createEvent.getUuid()) ? snapshotEndTimes.get(createEvent.getUuid()) : report.getEndMs();
      if (createEvent.getTimestampMs() <= report.getEndMs() && endTime >= report.getBeginMs() && volumeCreateEvents.containsKey(createEvent.getVolumeUuid())) {
        VolumeSnapshotUsageArtEntity usage=new VolumeSnapshotUsageArtEntity();
        usage.setSizeGB(createEvent.getSizeGB());
        usage.setSnapshotNum(1);
        long durationMs=Math.min(report.getEndMs(),endTime) - Math.max(report.getBeginMs(),createEvent.getTimestampMs());
        usage.setGBSecs(createEvent.getSizeGB() * (durationMs / 1000));
        VolumeArtEntity vol=addParentNodes(report,volumeCreateEvents.get(createEvent.getVolumeUuid()));
        vol.getSnapshotUsage().put(createEvent.getId(),usage);
      }
      return true;
    }
  }
);
  for (  String zoneName : report.getZones().keySet()) {
    AvailabilityZoneArtEntity zone=report.getZones().get(zoneName);
    for (    String accountName : zone.getAccounts().keySet()) {
      AccountArtEntity account=zone.getAccounts().get(accountName);
      for (      String userName : account.getUsers().keySet()) {
        UserArtEntity user=account.getUsers().get(userName);
        for (        String volumeUuid : user.getVolumes().keySet()) {
          VolumeArtEntity volume=user.getVolumes().get(volumeUuid);
          for (          String snapId : volume.getSnapshotUsage().keySet()) {
            VolumeSnapshotUsageArtEntity snap=volume.getSnapshotUsage().get(snapId);
            updateUsageTotals(volume.getSnapshotTotals(),snap);
            updateUsageTotals(user.getUsageTotals().getSnapshotTotals(),snap);
            updateUsageTotals(account.getUsageTotals().getSnapshotTotals(),snap);
            updateUsageTotals(zone.getUsageTotals().getSnapshotTotals(),snap);
          }
        }
      }
    }
  }
  return report;
}

Fixed version (ground truth):
public ReportArtEntity generateReportArt(final ReportArtEntity report){
  log.debug("String_Node_Str");
  final Map<String,Long> snapshotEndTimes=new HashMap<String,Long>();
  foreachReportingSnapshotDeleteEvent(report.getEndMs(),new Predicate<ReportingVolumeSnapshotDeleteEvent>(){
    @Override public boolean apply(    final ReportingVolumeSnapshotDeleteEvent deleteEvent){
      snapshotEndTimes.put(deleteEvent.getUuid(),deleteEvent.getTimestampMs());
      return true;
    }
  }
);
  final Map<String,ReportingVolumeCreateEvent> volumeCreateEvents=new HashMap<String,ReportingVolumeCreateEvent>();
  foreachReportingVolumeCreateEvent(report.getEndMs(),new Predicate<ReportingVolumeCreateEvent>(){
    @Override public boolean apply(    final ReportingVolumeCreateEvent createEvent){
      volumeCreateEvents.put(createEvent.getUuid(),createEvent);
      return true;
    }
  }
);
  foreachReportingSnapshotCreateEvent(report.getEndMs(),new Predicate<ReportingVolumeSnapshotCreateEvent>(){
    @Override public boolean apply(    final ReportingVolumeSnapshotCreateEvent createEvent){
      long endTime=snapshotEndTimes.containsKey(createEvent.getUuid()) ? snapshotEndTimes.get(createEvent.getUuid()) : report.getEndMs();
      if (createEvent.getTimestampMs() <= report.getEndMs() && endTime >= report.getBeginMs() && volumeCreateEvents.containsKey(createEvent.getVolumeUuid())) {
        VolumeSnapshotUsageArtEntity usage=new VolumeSnapshotUsageArtEntity();
        usage.setSizeGB(createEvent.getSizeGB());
        usage.setSnapshotNum(1);
        long durationMs=Math.min(report.getEndMs(),endTime) - Math.max(report.getBeginMs(),createEvent.getTimestampMs());
        usage.setGBSecs(createEvent.getSizeGB() * (durationMs / 1000));
        VolumeArtEntity vol=addParentNodes(report,volumeCreateEvents.get(createEvent.getVolumeUuid()));
        vol.getSnapshotUsage().put(createEvent.getVolumeSnapshotId(),usage);
      }
      return true;
    }
  }
);
  for (  String zoneName : report.getZones().keySet()) {
    AvailabilityZoneArtEntity zone=report.getZones().get(zoneName);
    for (    String accountName : zone.getAccounts().keySet()) {
      AccountArtEntity account=zone.getAccounts().get(accountName);
      for (      String userName : account.getUsers().keySet()) {
        UserArtEntity user=account.getUsers().get(userName);
        for (        String volumeUuid : user.getVolumes().keySet()) {
          VolumeArtEntity volume=user.getVolumes().get(volumeUuid);
          for (          String snapId : volume.getSnapshotUsage().keySet()) {
            VolumeSnapshotUsageArtEntity snap=volume.getSnapshotUsage().get(snapId);
            updateUsageTotals(volume.getSnapshotTotals(),snap);
            updateUsageTotals(user.getUsageTotals().getSnapshotTotals(),snap);
            updateUsageTotals(account.getUsageTotals().getSnapshotTotals(),snap);
            updateUsageTotals(zone.getUsageTotals().getSnapshotTotals(),snap);
          }
        }
      }
    }
  }
  return report;
}