Source:
<code>protected boolean canDoAction() { if (getVm() == null) { addCanDoActionMessage(VdcBllMessages.ACTION_TYPE_FAILED_VM_NOT_EXIST); return false; } if (!canRunActionOnNonManagedVm()) { return false; } if (!isSpecifiedDisksExist(getParameters().getDisks())) { return false; } VmValidator vmValidator = createVmValidator(); SnapshotsValidator snapshotValidator = createSnapshotValidator(); StoragePoolValidator spValidator = createStoragePoolValidator(); if (!(validateVM(vmValidator) && validate(spValidator.isUp()) && validate(vmValidator.vmNotIlegal()) && validate(vmValidator.vmNotLocked()) && validate(snapshotValidator.vmNotDuringSnapshot(getVmId())) && validate(snapshotValidator.vmNotInPreview(getVmId())) && validate(vmValidator.vmNotDuringMigration()) && validate(vmValidator.vmNotRunningStateless()))) { return false; } List<DiskImage> disksList = getDisksListForChecks(); MultipleStorageDomainsValidator sdValidator = createMultipleStorageDomainsValidator(disksList); if (disksList.size() > 0) { DiskImagesValidator diskImagesValidator = createDiskImageValidator(disksList); if (!(validate(diskImagesValidator.diskImagesNotLocked()) && validate(diskImagesValidator.diskImagesNotIllegal()) && validate(sdValidator.allDomainsExistAndActive()))) { return false; } } <START> if (!validateSpaceRequirements(sdValidator, disksList)) { <END> return false; } if (getParameters().isSaveMemory() && Guid.Empty.equals(getStorageDomainIdForVmMemory())) { return failCanDoAction(VdcBllMessages.ACTION_TYPE_FAILED_NO_SUITABLE_DOMAIN_FOUND); } return true; }</code><technical_language>this diskList.size() > 0 if</technical_language>

Target:
protected boolean canDoAction() { if (getVm() == null) { addCanDoActionMessage(VdcBllMessages.ACTION_TYPE_FAILED_VM_NOT_EXIST); return false; } if (!canRunActionOnNonManagedVm()) { return false; } if (!isSpecifiedDisksExist(getParameters().getDisks())) { return false; } VmValidator vmValidator = createVmValidator(); SnapshotsValidator snapshotValidator = createSnapshotValidator(); StoragePoolValidator spValidator = createStoragePoolValidator(); if (!(validateVM(vmValidator) && validate(spValidator.isUp()) && validate(vmValidator.vmNotIlegal()) && validate(vmValidator.vmNotLocked()) && validate(snapshotValidator.vmNotDuringSnapshot(getVmId())) && validate(snapshotValidator.vmNotInPreview(getVmId())) && validate(vmValidator.vmNotDuringMigration()) && validate(vmValidator.vmNotRunningStateless()))) { return false; } List<DiskImage> disksList = getDisksListForChecks(); MultipleStorageDomainsValidator sdValidator = createMultipleStorageDomainsValidator(disksList); if (disksList.size() > 0) { DiskImagesValidator diskImagesValidator = createDiskImageValidator(disksList); if (!(validate(diskImagesValidator.diskImagesNotLocked()) && validate(diskImagesValidator.diskImagesNotIllegal()) && validate(sdValidator.allDomainsExistAndActive()))) { return false; } } List<DiskImage> cloneDisksList = getMemoryImageBuilder().getDisksToBeCreated(); if (!validateSpaceRequirements(sdValidator, disksList, cloneDisksList)) { return false; } if (getParameters().isSaveMemory() && Guid.Empty.equals(getStorageDomainIdForVmMemory())) { return failCanDoAction(VdcBllMessages.ACTION_TYPE_FAILED_NO_SUITABLE_DOMAIN_FOUND); } return true; }