List<Integer> result = results.get(yearAndMonth);
if (result != null && !result.isEmpty()) {
Map<String, Object> map = scanDao.getCountsForScans(result);
Scan scan = new Scan();
scan.setNumberCriticalVulnerabilities((Long) map.get("critical"));
scan.setNumberHighVulnerabilities((Long) map.get("high"));
scan.setNumberMediumVulnerabilities((Long) map.get("medium"));
scan.setNumberLowVulnerabilities((Long) map.get("low"));
scan.setNumberInfoVulnerabilities((Long) map.get("info"));
dateList.add(yearAndMonth.getMonthName());
scanList.add(scan);
} else {
Scan scan = new Scan();
scan.setNumberCriticalVulnerabilities(0L);
scan.setNumberHighVulnerabilities(0L);
scan.setNumberMediumVulnerabilities(0L);
scan.setNumberLowVulnerabilities(0L);
scan.setNumberInfoVulnerabilities(0L);
dateList.add(yearAndMonth.getMonthName());
scanList.add(scan);
}