Source:
<code>private void populateUnregisteredDisksListWithUnregisteredDisk(Guid storagePoolId, Guid storageDomainId, List<Disk> unregisteredDisks, Guid unregisteredDiskId) { StoragePoolDomainAndGroupIdBaseVDSCommandParameters getVolumesParameters = new StoragePoolDomainAndGroupIdBaseVDSCommandParameters( storagePoolId, storageDomainId, unregisteredDiskId); VDSReturnValue imageInfoReturn = null; VDSReturnValue volumesListReturn = null; try { volumesListReturn = runVdsCommand(VDSCommandType.GetVolumesList, getVolumesParameters); if (!volumesListReturn.getSucceeded()) { logUnregisterDiskFailure(unregisteredDiskId.toString(), volumesListReturn.getExceptionString()); return; } List<Guid> volumesList = (List<Guid>) volumesListReturn.getReturnValue(); if (volumesList.size() != 1) { <START> log.infoFormat("Could not get populated disk image id {1} since the disk contains snapshots.", <END> unregisteredDiskId); return; } GetImageInfoVDSCommandParameters imageInfoParameters = new GetImageInfoVDSCommandParameters( storagePoolId, storageDomainId, unregisteredDiskId, volumesList.get(0)); imageInfoReturn = runVdsCommand(VDSCommandType.GetImageInfo, imageInfoParameters); } catch (VdcBLLException e) { logUnregisterDiskFailure(unregisteredDiskId.toString(), e.getMessage()); } if (imageInfoReturn == null || !imageInfoReturn.getSucceeded()) { logUnregisterDiskFailure(unregisteredDiskId.toString(), volumesListReturn.getExceptionString()); return; } DiskImage newDiskImage = (DiskImage) imageInfoReturn.getReturnValue(); newDiskImage.setDiskInterface(DiskInterface.IDE); newDiskImage.setStoragePoolId(storagePoolId); unregisteredDisks.add(newDiskImage); }</code><technical_language>MessageFormat is zero based, based</technical_language>

Target:
private void populateUnregisteredDisksListWithUnregisteredDisk(Guid storagePoolId, Guid storageDomainId, List<Disk> unregisteredDisks, Guid unregisteredDiskId) { StoragePoolDomainAndGroupIdBaseVDSCommandParameters getVolumesParameters = new StoragePoolDomainAndGroupIdBaseVDSCommandParameters( storagePoolId, storageDomainId, unregisteredDiskId); VDSReturnValue imageInfoReturn = null; VDSReturnValue volumesListReturn = null; try { volumesListReturn = runVdsCommand(VDSCommandType.GetVolumesList, getVolumesParameters); if (!volumesListReturn.getSucceeded()) { logUnregisterDiskFailure(unregisteredDiskId.toString(), volumesListReturn.getExceptionString()); return; } List<Guid> volumesList = (List<Guid>) volumesListReturn.getReturnValue(); if (volumesList.size() != 1) { log.infoFormat("Could not get populated disk image id {0} since the disk contains snapshots.", unregisteredDiskId); return; } GetImageInfoVDSCommandParameters imageInfoParameters = new GetImageInfoVDSCommandParameters( storagePoolId, storageDomainId, unregisteredDiskId, volumesList.get(0)); imageInfoReturn = runVdsCommand(VDSCommandType.GetImageInfo, imageInfoParameters); } catch (VdcBLLException e) { logUnregisterDiskFailure(unregisteredDiskId.toString(), e.getMessage()); } if (imageInfoReturn == null || !imageInfoReturn.getSucceeded()) { logUnregisterDiskFailure(unregisteredDiskId.toString(), volumesListReturn.getExceptionString()); return; } DiskImage newDiskImage = (DiskImage) imageInfoReturn.getReturnValue(); newDiskImage.setDiskInterface(DiskInterface.IDE); newDiskImage.setStoragePoolId(storagePoolId); unregisteredDisks.add(newDiskImage); }