Source:
<code>public static void updateMoveAndCopyCommandAvailability(List<DiskImage> disks, UICommand moveCommand, UICommand copyCommand) { <START> boolean isCopyAllowed = true; boolean isMoveAllowed = true; <END> if (moveCommand == null || copyCommand == null) { return; } if (disks == null || disks.isEmpty() || disks.get(0).getDiskStorageType() != DiskStorageType.IMAGE) { disableMoveAndCopyCommands(copyCommand, moveCommand); return; } Guid dataCenterId = disks.get(0).getStoragePoolId(); boolean foundTemplateDisk = false; boolean foundVmDisk = false; boolean foundUnattachedDisk = false; for (DiskImage disk : disks) { boolean isCopyOrMoveAllowed = isCopyAllowed || isMoveAllowed; boolean isImage = disk.getDiskStorageType() == DiskStorageType.IMAGE; boolean isImageStatusOK = disk.getImageStatus() == ImageStatus.OK; boolean isTheSameDataCenter = dataCenterId.equals(disk.getStoragePoolId()); boolean isOvf = disk.isOvfStore(); if (!isCopyOrMoveAllowed || !isImage || !isImageStatusOK || !isTheSameDataCenter || isOvf) { disableMoveAndCopyCommands(moveCommand, copyCommand); return; } VmEntityType vmEntityType = disk.getVmEntityType(); if (vmEntityType == null) { foundUnattachedDisk = true; } else if (vmEntityType.isTemplateType()) { foundTemplateDisk = true; } else if (vmEntityType.isVmType()) { foundVmDisk = true; } if (foundTemplateDisk && (foundUnattachedDisk || foundVmDisk)) { isCopyAllowed = false; } if (vmEntityType != null && vmEntityType.isTemplateType()) { isMoveAllowed = false; } } copyCommand.setIsExecutionAllowed(isCopyAllowed); moveCommand.setIsExecutionAllowed(isMoveAllowed); }</code><technical_language>Move line #93 (just "foundTemplateDisk")</technical_language>

Target:
public static void updateMoveAndCopyCommandAvailability(List<DiskImage> disks, UICommand moveCommand, UICommand copyCommand) { boolean isCopyAllowed = true; boolean isMoveAllowed = true; if (moveCommand == null || copyCommand == null) { return; } if (disks == null || disks.isEmpty() || disks.get(0).getDiskStorageType() != DiskStorageType.IMAGE) { disableMoveAndCopyCommands(moveCommand, copyCommand); return; } Guid dataCenterId = disks.get(0).getStoragePoolId(); boolean foundTemplateDisk = false; boolean foundVmDisk = false; boolean foundUnattachedDisk = false; for (DiskImage disk : disks) { boolean isCopyOrMoveAllowed = isCopyAllowed || isMoveAllowed; boolean isImage = disk.getDiskStorageType() == DiskStorageType.IMAGE; boolean isImageStatusOK = disk.getImageStatus() == ImageStatus.OK; boolean isTheSameDataCenter = dataCenterId.equals(disk.getStoragePoolId()); boolean isOvf = disk.isOvfStore(); if (!isCopyOrMoveAllowed || !isImage || !isImageStatusOK || !isTheSameDataCenter || isOvf) { disableMoveAndCopyCommands(moveCommand, copyCommand); return; } VmEntityType vmEntityType = disk.getVmEntityType(); if (vmEntityType == null) { foundUnattachedDisk = true; } else if (vmEntityType.isTemplateType()) { foundTemplateDisk = true; } else if (vmEntityType.isVmType()) { foundVmDisk = true; } if (foundTemplateDisk && (foundUnattachedDisk || foundVmDisk)) { isCopyAllowed = false; } if (vmEntityType != null && vmEntityType.isTemplateType()) { isMoveAllowed = false; } } copyCommand.setIsExecutionAllowed(isCopyAllowed); moveCommand.setIsExecutionAllowed(isMoveAllowed); }