Source:
<code>protected void executeQueryCommand() { VM srcVm = getParameters().getOriginal(); VM dstVm = getParameters().getUpdated(); VmStatic srcStatic = srcVm.getStaticData(); VmStatic dstStatic = dstVm.getStaticData(); dstStatic.setCreationDate(srcStatic.getCreationDate()); if (VmCommonUtils.isCpusToBeHotplugged(srcVm, dstVm)) { dstStatic.setNumOfSockets(srcStatic.getNumOfSockets()); } if (VmCommonUtils.isMemoryToBeHotplugged(srcVm, dstVm)) { dstStatic.setMemSizeMb(srcStatic.getMemSizeMb()); dstStatic.setMinAllocatedMem(srcStatic.getMinAllocatedMem()); } if <START> (VmCommonUtils.isVmLeaseToBeHotplugged(srcVm, <END> dstVm)) { dstStatic.setLeaseStorageDomainId(srcStatic.getLeaseStorageDomainId()); } VmPropertiesUtils vmPropertiesUtils = SimpleDependencyInjector.getInstance().get(VmPropertiesUtils.class); vmPropertiesUtils.separateCustomPropertiesToUserAndPredefined( srcVm.getCompatibilityVersion(), srcStatic); vmPropertiesUtils.separateCustomPropertiesToUserAndPredefined( dstVm.getCompatibilityVersion(), dstStatic); Set<String> result = new HashSet<>(vmHandler.getChangedFieldsForStatus(srcStatic, dstStatic, VMStatus.Up)); for (VmDeviceUpdate device : vmHandler.getVmDevicesFieldsToUpdateOnNextRun(srcVm.getId(), VMStatus.Up, getParameters().getUpdateVmParameters())) { if (!device.getName().isEmpty()) { result.add(device.getName()); } else { switch (device.getType()) { case UNKNOWN: case VIRTIO: result.add(device.getGeneralType().name()); break; default: result.add(device.getType().getName()); break; } } } setReturnValue(new ArrayList<>(result)); }</code><technical_language>a good name, I suggest: isVmLeaseToBeHotPluggedOrUplugged</technical_language>

Target:
protected void executeQueryCommand() { VM srcVm = getParameters().getOriginal(); VM dstVm = getParameters().getUpdated(); VmStatic srcStatic = srcVm.getStaticData(); VmStatic dstStatic = dstVm.getStaticData(); dstStatic.setCreationDate(srcStatic.getCreationDate()); if (VmCommonUtils.isCpusToBeHotpluggedOrUnplugged(srcVm, dstVm)) { dstStatic.setNumOfSockets(srcStatic.getNumOfSockets()); } if (VmCommonUtils.isMemoryToBeHotplugged(srcVm, dstVm)) { dstStatic.setMemSizeMb(srcStatic.getMemSizeMb()); dstStatic.setMinAllocatedMem(srcStatic.getMinAllocatedMem()); } if (VmCommonUtils.isVmLeaseToBeHotPluggedOrUnplugged(srcVm, dstVm)) { dstStatic.setLeaseStorageDomainId(srcStatic.getLeaseStorageDomainId()); } VmPropertiesUtils vmPropertiesUtils = SimpleDependencyInjector.getInstance().get(VmPropertiesUtils.class); vmPropertiesUtils.separateCustomPropertiesToUserAndPredefined( srcVm.getCompatibilityVersion(), srcStatic); vmPropertiesUtils.separateCustomPropertiesToUserAndPredefined( dstVm.getCompatibilityVersion(), dstStatic); Set<String> result = new HashSet<>(vmHandler.getChangedFieldsForStatus(srcStatic, dstStatic, VMStatus.Up)); for (VmDeviceUpdate device : vmHandler.getVmDevicesFieldsToUpdateOnNextRun(srcVm.getId(), VMStatus.Up, getParameters().getUpdateVmParameters())) { if (!device.getName().isEmpty()) { result.add(device.getName()); } else { switch (device.getType()) { case UNKNOWN: case VIRTIO: result.add(device.getGeneralType().name()); break; default: result.add(device.getType().getName()); break; } } } setReturnValue(new ArrayList<>(result)); }