Program: 107445
Project: 107445
Buggy source:
@Override @SuppressWarnings("String_Node_Str") public ListResponse<VolumeResponse> getResponse(){
  List<VolumeVO> volumes=(List<VolumeVO>)getResponseObject();
  ListResponse<VolumeResponse> response=new ListResponse<VolumeResponse>();
  List<VolumeResponse> volResponses=new ArrayList<VolumeResponse>();
  for (  VolumeVO volume : volumes) {
    VolumeResponse volResponse=new VolumeResponse();
    volResponse.setId(volume.getId());
    AsyncJobVO asyncJob=ApiDBUtils.findInstancePendingAsyncJob("String_Node_Str",volume.getId());
    if (asyncJob != null) {
      volResponse.setJobId(asyncJob.getId());
      volResponse.setJobStatus(asyncJob.getStatus());
    }
    if (volume.getName() != null) {
      volResponse.setName(volume.getName());
    }
 else {
      volResponse.setName("String_Node_Str");
    }
    volResponse.setZoneId(volume.getDataCenterId());
    volResponse.setZoneName(ApiDBUtils.findZoneById(volume.getDataCenterId()).getName());
    volResponse.setVolumeType(volume.getVolumeType().toString());
    volResponse.setDeviceId(volume.getDeviceId());
    Long instanceId=volume.getInstanceId();
    if (instanceId != null) {
      VMInstanceVO vm=ApiDBUtils.findVMInstanceById(instanceId);
      volResponse.setVirtualMachineId(vm.getId());
      volResponse.setVirtualMachineName(vm.getName());
      volResponse.setVirtualMachineDisplayName(vm.getName());
      volResponse.setVirtualMachineState(vm.getState().toString());
    }
    volResponse.setSize(volume.getSize());
    volResponse.setCreated(volume.getCreated());
    volResponse.setState(volume.getStatus().toString());
    Account accountTemp=ApiDBUtils.findAccountById(volume.getAccountId());
    if (accountTemp != null) {
      volResponse.setAccountName(accountTemp.getAccountName());
      volResponse.setDomainId(accountTemp.getDomainId());
      volResponse.setDomainName(ApiDBUtils.findDomainById(accountTemp.getDomainId()).getName());
    }
    String storageType;
    try {
      if (volume.getPoolId() == null) {
        if (volume.getState() == Volume.State.Allocated) {
          storageType="String_Node_Str";
        }
 else {
          storageType="String_Node_Str";
        }
      }
 else {
        storageType=ApiDBUtils.volumeIsOnSharedStorage(volume.getId()) ? "String_Node_Str" : "String_Node_Str";
      }
    }
 catch (    InvalidParameterValueException e) {
      s_logger.error(e.getMessage(),e);
      throw new ServerApiException(BaseCmd.INTERNAL_ERROR,"String_Node_Str" + volume.getName() + "String_Node_Str");
    }
    volResponse.setStorageType(storageType);
    volResponse.setDiskOfferingId(volume.getDiskOfferingId());
    DiskOfferingVO diskOffering=ApiDBUtils.findDiskOfferingById(volume.getDiskOfferingId());
    volResponse.setDiskOfferingName(diskOffering.getName());
    volResponse.setDiskOfferingDisplayText(diskOffering.getDisplayText());
    Long poolId=volume.getPoolId();
    String poolName=(poolId == null) ? "String_Node_Str" : ApiDBUtils.findStoragePoolById(poolId).getName();
    volResponse.setStoragePoolName(poolName);
    volResponse.setSourceId(volume.getSourceId());
    volResponse.setSourceType(volume.getSourceType().toString());
    volResponse.setHypervisor(ApiDBUtils.getVolumeHyperType(volume.getId()).toString());
    volResponse.setResponseName("String_Node_Str");
    volResponses.add(volResponse);
  }
  response.setResponses(volResponses);
  response.setResponseName(getName());
  return response;
}

Fixed version (ground truth):
@Override @SuppressWarnings("String_Node_Str") public ListResponse<VolumeResponse> getResponse(){
  List<VolumeVO> volumes=(List<VolumeVO>)getResponseObject();
  ListResponse<VolumeResponse> response=new ListResponse<VolumeResponse>();
  List<VolumeResponse> volResponses=new ArrayList<VolumeResponse>();
  for (  VolumeVO volume : volumes) {
    VolumeResponse volResponse=new VolumeResponse();
    volResponse.setId(volume.getId());
    AsyncJobVO asyncJob=ApiDBUtils.findInstancePendingAsyncJob("String_Node_Str",volume.getId());
    if (asyncJob != null) {
      volResponse.setJobId(asyncJob.getId());
      volResponse.setJobStatus(asyncJob.getStatus());
    }
    if (volume.getName() != null) {
      volResponse.setName(volume.getName());
    }
 else {
      volResponse.setName("String_Node_Str");
    }
    volResponse.setZoneId(volume.getDataCenterId());
    volResponse.setZoneName(ApiDBUtils.findZoneById(volume.getDataCenterId()).getName());
    volResponse.setVolumeType(volume.getVolumeType().toString());
    volResponse.setDeviceId(volume.getDeviceId());
    Long instanceId=volume.getInstanceId();
    if (instanceId != null) {
      VMInstanceVO vm=ApiDBUtils.findVMInstanceById(instanceId);
      volResponse.setVirtualMachineId(vm.getId());
      volResponse.setVirtualMachineName(vm.getName());
      volResponse.setVirtualMachineDisplayName(vm.getName());
      volResponse.setVirtualMachineState(vm.getState().toString());
    }
    volResponse.setSize(volume.getSize());
    volResponse.setCreated(volume.getCreated());
    volResponse.setState(volume.getStatus().toString());
    Account accountTemp=ApiDBUtils.findAccountById(volume.getAccountId());
    if (accountTemp != null) {
      volResponse.setAccountName(accountTemp.getAccountName());
      volResponse.setDomainId(accountTemp.getDomainId());
      volResponse.setDomainName(ApiDBUtils.findDomainById(accountTemp.getDomainId()).getName());
    }
    String storageType;
    try {
      if (volume.getPoolId() == null) {
        if (volume.getState() == Volume.State.Allocated) {
          storageType="String_Node_Str";
        }
 else {
          storageType="String_Node_Str";
        }
      }
 else {
        storageType=ApiDBUtils.volumeIsOnSharedStorage(volume.getId()) ? "String_Node_Str" : "String_Node_Str";
      }
    }
 catch (    InvalidParameterValueException e) {
      s_logger.error(e.getMessage(),e);
      throw new ServerApiException(BaseCmd.INTERNAL_ERROR,"String_Node_Str" + volume.getName() + "String_Node_Str");
    }
    volResponse.setStorageType(storageType);
    volResponse.setDiskOfferingId(volume.getDiskOfferingId());
    DiskOfferingVO diskOffering=ApiDBUtils.findDiskOfferingById(volume.getDiskOfferingId());
    volResponse.setDiskOfferingName(diskOffering.getName());
    volResponse.setDiskOfferingDisplayText(diskOffering.getDisplayText());
    Long poolId=volume.getPoolId();
    String poolName=(poolId == null) ? "String_Node_Str" : ApiDBUtils.findStoragePoolById(poolId).getName();
    volResponse.setStoragePoolName(poolName);
    volResponse.setSourceId(volume.getSourceId());
    if (volume.getSourceType() != null) {
      volResponse.setSourceType(volume.getSourceType().toString());
    }
    volResponse.setHypervisor(ApiDBUtils.getVolumeHyperType(volume.getId()).toString());
    volResponse.setResponseName("String_Node_Str");
    volResponses.add(volResponse);
  }
  response.setResponses(volResponses);
  response.setResponseName(getName());
  return response;
}