// skipping null checks for now
private List<Scan> getScansBetween(Scan firstScan, Scan secondScan) {
List<Scan> betweenScans = new ArrayList<>();
Scan tempScan = firstScan;
while (true) {
if (secondScan.getImportTime().after(tempScan.getImportTime())
&& (secondScan.getImportTime().get(Calendar.YEAR) != tempScan
.getImportTime().get(Calendar.YEAR) || secondScan
.getImportTime().get(Calendar.MONTH) != tempScan
.getImportTime().get(Calendar.MONTH))) {
Calendar newCalendar = Calendar.getInstance();
newCalendar.setTime(tempScan.getImportTime().getTime());
newCalendar.add(Calendar.MONTH, 1);
if (secondScan.getImportTime().after(newCalendar)
&& (secondScan.getImportTime().get(Calendar.YEAR) != newCalendar
.get(Calendar.YEAR) || secondScan
.getImportTime().get(Calendar.MONTH) != newCalendar
.get(Calendar.MONTH))) {
Scan newScan = new Scan();
newScan.setNumberClosedVulnerabilities(0);
newScan.setNumberNewVulnerabilities(0);
newScan.setNumberResurfacedVulnerabilities(0);
newScan.setNumberOldVulnerabilities(firstScan.getNumberOldVulnerabilities() +
firstScan.getNumberNewVulnerabilities() +
firstScan.getNumberResurfacedVulnerabilities());
newScan.setNumberOldVulnerabilitiesInitiallyFromThisChannel(0);
newScan.setNumberTotalVulnerabilities(0);
newScan.setImportTime(newCalendar);
betweenScans.add(newScan);
tempScan = newScan;
} else {
break;
}