Source:
<code>private List<Map<String, Object>> parseDisks(XmlDocument document, List<VmDevice> devices) { List<VmDevice> dbDevices = filterDevices(devices, VmDeviceGeneralType.DISK); MemoizingSupplier<Map<Guid, String>> diskToLunSupplier = new MemoizingSupplier<>(() -> { <START> return diskLunMapDao.getAll().stream().collect(Collectors.toMap( <END> DiskLunMap::getDiskId, DiskLunMap::getLunId)); }); List<Map<String, Object>> result = new ArrayList<>(); for (XmlNode node : selectNodes(document, VmDeviceGeneralType.DISK)) { Map<String, Object> dev = new HashMap<>(); dev.put(VdsProperties.Type, VmDeviceGeneralType.DISK.getValue()); String diskType = parseAttribute(node, DEVICE); dev.put(VdsProperties.Device, diskType); dev.put(VdsProperties.Address, parseAddress(node)); dev.put(VdsProperties.Alias, parseAlias(node)); String path = parseDiskPath(node); VmDevice dbDev = dbDevices.stream() .filter(d -> d.getDevice().equals(diskType)) .filter(d -> { switch(diskType) { case "cdrom": String devicePath = (String) d.getSpecParams().get("path"); return devicePath == null || path.contains(devicePath); case "floppy": return true; default: Guid diskId = d.getId().getDeviceId(); return path.contains(diskId.toString()) || isPathContainsLunIdOfDisk(path, diskId, diskToLunSupplier); } }) .findFirst() .orElse(null); if (dbDev == null) { log.warn("unmanaged disk with path '{}' is ignored", path); continue; } dbDevices.remove(dbDev); dev.put(VdsProperties.DeviceId, dbDev.getId().getDeviceId().toString()); dev.put(VdsProperties.SpecParams, dbDev.getSpecParams()); result.add(dev); } return result; }</code><technical_language>I return is redundant, braces lines 298 302</technical_language>

Target:
private List<Map<String, Object>> parseDisks(XmlDocument document, List<VmDevice> devices) { List<VmDevice> dbDevices = filterDevices(devices, VmDeviceGeneralType.DISK); MemoizingSupplier<Map<Guid, String>> diskToLunSupplier = new MemoizingSupplier<>(() -> { return diskLunMapDao.getAll().stream().collect(Collectors.toMap( DiskLunMap::getDiskId, DiskLunMap::getLunId)); }); List<Map<String, Object>> result = new ArrayList<>(); for (XmlNode node : selectNodes(document, VmDeviceGeneralType.DISK)) { Map<String, Object> dev = new HashMap<>(); dev.put(VdsProperties.Type, VmDeviceGeneralType.DISK.getValue()); String diskType = parseAttribute(node, DEVICE); dev.put(VdsProperties.Device, diskType); dev.put(VdsProperties.Address, parseAddress(node)); dev.put(VdsProperties.Alias, parseAlias(node)); String path = parseDiskPath(node); VmDevice dbDev = dbDevices.stream() .filter(d -> { switch(diskType) { case "cdrom": String devicePath = (String) d.getSpecParams().get("path"); return devicePath == null || path.contains(devicePath); case "floppy": return true; default: Guid diskId = d.getId().getDeviceId(); return path.contains(diskId.toString()) || isPathContainsLunIdOfDisk(path, diskId, diskToLunSupplier); } }) .findFirst() .orElse(null); if (dbDev == null) { log.warn("unmanaged disk with path '{}' is ignored", path); continue; } dbDevices.remove(dbDev); dev.put(VdsProperties.DeviceId, dbDev.getId().getDeviceId().toString()); dev.put(VdsProperties.SpecParams, dbDev.getSpecParams()); result.add(dev); } return result; }