Source:
<code><START> protected List<OvfEntityData> getEntitiesFromStorageOvfDisk() { <END> List<OvfEntityData> ovfEntitiesFromTar = Collections.emptyList(); List<Disk> unregisteredDisks = getBackend().runInternalQuery(VdcQueryType.GetUnregisteredDisks, new GetUnregisteredDisksQueryParameters(getParameters().getStorageDomainId(), getVds().getStoragePoolId())).getReturnValue(); List<DiskImage> ovfStoreDiskImages = getAllOVFDisks(unregisteredDisks); if (!ovfStoreDiskImages.isEmpty()) { registerAllOvfDisks(ovfStoreDiskImages); Pair<DiskImage, Long> ovfDiskAndSize = getLatestOVFDisk(ovfStoreDiskImages); DiskImage ovfDisk = ovfDiskAndSize.getFirst(); if (ovfDisk != null) { try { VDSReturnValue retrievedByteData = runVdsCommand(VDSCommandType.RetrieveImageData, new ImageHttpAccessVDSCommandParameters(getVdsId(), getParameters().getStoragePoolId(), getParameters().getStorageDomainId(), ovfDisk.getId(), ovfDisk.getImage().getId(), ovfDiskAndSize.getSecond())); if (retrievedByteData.getSucceeded()) { ovfEntitiesFromTar = OvfUtils.getOvfEntities((byte[]) retrievedByteData.getReturnValue(), getParameters().getStorageDomainId()); } else { log.errorFormat("Image data could not be retrieved for disk id {0} in storage domain id {1}", ovfDisk.getId(), getParameters().getStorageDomainId()); AuditLogDirector.log(this, AuditLogType.RETRIEVE_OVF_STORE_FAILED); } } catch (RuntimeException e) { log.errorFormat("Image data could not be retrieved for disk id {0} in storage domain id {1}. Error: {2}", ovfDisk.getId(), getParameters().getStorageDomainId(), e); AuditLogDirector.log(this, AuditLogType.RETRIEVE_OVF_STORE_FAILED); } } } else { log.warnFormat("There are no OVF_STORE disks on storage domain id {0}", getParameters().getStorageDomainId()); } return ovfEntitiesFromTar; }</code><technical_language>method name longer correct</technical_language>

Target:
protected List<OvfEntityData> getEntitiesFromStorageOvfDisk() { List<OvfEntityData> ovfEntitiesFromTar = Collections.emptyList(); List<DiskImage> ovfStoreDiskImages = getAllOVFDisks(); if (!ovfStoreDiskImages.isEmpty()) { Pair<DiskImage, Long> ovfDiskAndSize = getLatestOVFDisk(ovfStoreDiskImages); DiskImage ovfDisk = ovfDiskAndSize.getFirst(); if (ovfDisk != null) { try { VDSReturnValue retrievedByteData = runVdsCommand(VDSCommandType.RetrieveImageData, new ImageHttpAccessVDSCommandParameters(getVdsId(), getParameters().getStoragePoolId(), getParameters().getStorageDomainId(), ovfDisk.getId(), ovfDisk.getImage().getId(), ovfDiskAndSize.getSecond())); if (retrievedByteData.getSucceeded()) { ovfEntitiesFromTar = OvfUtils.getOvfEntities((byte[]) retrievedByteData.getReturnValue(), getParameters().getStorageDomainId()); } else { log.errorFormat("Image data could not be retrieved for disk id {0} in storage domain id {1}", ovfDisk.getId(), getParameters().getStorageDomainId()); AuditLogDirector.log(this, AuditLogType.RETRIEVE_OVF_STORE_FAILED); } } catch (RuntimeException e) { log.errorFormat("Image data could not be retrieved for disk id {0} in storage domain id {1}. Error: {2}", ovfDisk.getId(), getParameters().getStorageDomainId(), e); AuditLogDirector.log(this, AuditLogType.RETRIEVE_OVF_STORE_FAILED); } } } else { log.warnFormat("There are no OVF_STORE disks on storage domain id {0}", getParameters().getStorageDomainId()); } return ovfEntitiesFromTar; }