Program: 105155
Project: 105155
Buggy source:
@SuppressWarnings("String_Node_Str") @Test public void testCreatePrivateTemplateFromVolumeCommand(){
  final StoragePool pool=Mockito.mock(StoragePool.class);
  ;
  final String secondaryStorageUrl="String_Node_Str";
  final long templateId=1l;
  final long accountId=1l;
  final String userSpecifiedName="String_Node_Str";
  final String uniqueName="String_Node_Str";
  final String volumePath="String_Node_Str";
  final String vmName="String_Node_Str";
  final int wait=0;
  final CreatePrivateTemplateFromVolumeCommand command=new CreatePrivateTemplateFromVolumeCommand(pool,secondaryStorageUrl,templateId,accountId,userSpecifiedName,uniqueName,volumePath,vmName,wait);
  final KVMStoragePoolManager storagePoolMgr=Mockito.mock(KVMStoragePoolManager.class);
  final KVMStoragePool secondaryStorage=Mockito.mock(KVMStoragePool.class);
  when(libvirtComputingResource.getStoragePoolMgr()).thenReturn(storagePoolMgr);
  when(storagePoolMgr.getStoragePoolByURI(secondaryStorageUrl)).thenReturn(secondaryStorage);
  when(storagePoolMgr.getStoragePool(command.getPool().getType(),command.getPrimaryStoragePoolNameLabel())).thenThrow(new CloudRuntimeException("String_Node_Str"));
  final LibvirtRequestWrapper wrapper=LibvirtRequestWrapper.getInstance();
  assertNotNull(wrapper);
  final Answer answer=wrapper.execute(command,libvirtComputingResource);
  assertFalse(answer.getResult());
  verify(libvirtComputingResource,times(1)).getStoragePoolMgr();
  verify(storagePoolMgr,times(1)).getStoragePoolByURI(secondaryStorageUrl);
  verify(storagePoolMgr,times(1)).getStoragePool(command.getPool().getType(),command.getPrimaryStoragePoolNameLabel());
}

Fixed version (ground truth):
@Test public void testCreatePrivateTemplateFromVolumeCommand(){
  final StoragePool pool=Mockito.mock(StoragePool.class);
  ;
  final String secondaryStorageUrl="String_Node_Str";
  final long templateId=1l;
  final long accountId=1l;
  final String userSpecifiedName="String_Node_Str";
  final String uniqueName="String_Node_Str";
  final String volumePath="String_Node_Str";
  final String vmName="String_Node_Str";
  final int wait=0;
  final CreatePrivateTemplateFromVolumeCommand command=new CreatePrivateTemplateFromVolumeCommand(pool,secondaryStorageUrl,templateId,accountId,userSpecifiedName,uniqueName,volumePath,vmName,wait);
  final KVMStoragePoolManager storagePoolMgr=Mockito.mock(KVMStoragePoolManager.class);
  final KVMStoragePool secondaryStorage=Mockito.mock(KVMStoragePool.class);
  when(libvirtComputingResource.getStoragePoolMgr()).thenReturn(storagePoolMgr);
  when(storagePoolMgr.getStoragePoolByURI(secondaryStorageUrl)).thenReturn(secondaryStorage);
  when(storagePoolMgr.getStoragePool(command.getPool().getType(),command.getPrimaryStoragePoolNameLabel())).thenThrow(new CloudRuntimeException("String_Node_Str"));
  final LibvirtRequestWrapper wrapper=LibvirtRequestWrapper.getInstance();
  assertNotNull(wrapper);
  final Answer answer=wrapper.execute(command,libvirtComputingResource);
  assertFalse(answer.getResult());
  verify(libvirtComputingResource,times(1)).getStoragePoolMgr();
  verify(storagePoolMgr,times(1)).getStoragePoolByURI(secondaryStorageUrl);
  verify(storagePoolMgr,times(1)).getStoragePool(command.getPool().getType(),command.getPrimaryStoragePoolNameLabel());
}