Program: 105199
Project: 105199
Buggy source:
@Override public VpcResponse createVpcResponse(ResponseView view,Vpc vpc){
  VpcResponse response=new VpcResponse();
  response.setId(vpc.getUuid());
  response.setName(vpc.getName());
  response.setDisplayText(vpc.getDisplayText());
  response.setState(vpc.getState().name());
  VpcOffering voff=ApiDBUtils.findVpcOfferingById(vpc.getVpcOfferingId());
  if (voff != null) {
    response.setVpcOfferingId(voff.getUuid());
  }
  response.setCidr(vpc.getCidr());
  response.setRestartRequired(vpc.isRestartRequired());
  response.setNetworkDomain(vpc.getNetworkDomain());
  response.setForDisplay(vpc.isDisplay());
  response.setUsesDistributedRouter(vpc.usesDistributedRouter());
  response.setRedundantRouter(vpc.isRedundant());
  response.setRegionLevelVpc(vpc.isRegionLevelVpc());
  Map<Service,Set<Provider>> serviceProviderMap=ApiDBUtils.listVpcOffServices(vpc.getVpcOfferingId());
  List<ServiceResponse> serviceResponses=new ArrayList<ServiceResponse>();
  for (  Map.Entry<Service,Set<Provider>> entry : serviceProviderMap.entrySet()) {
    Service service=entry.getKey();
    Set<Provider> serviceProviders=entry.getValue();
    ServiceResponse svcRsp=new ServiceResponse();
    if (service == Service.Gateway) {
      continue;
    }
    svcRsp.setName(service.getName());
    List<ProviderResponse> providers=new ArrayList<ProviderResponse>();
    for (    Provider provider : serviceProviders) {
      if (provider != null) {
        ProviderResponse providerRsp=new ProviderResponse();
        providerRsp.setName(provider.getName());
        providers.add(providerRsp);
      }
    }
    svcRsp.setProviders(providers);
    serviceResponses.add(svcRsp);
  }
  List<NetworkResponse> networkResponses=new ArrayList<NetworkResponse>();
  List<? extends Network> networks=ApiDBUtils.listVpcNetworks(vpc.getId());
  for (  Network network : networks) {
    NetworkResponse ntwkRsp=createNetworkResponse(view,network);
    networkResponses.add(ntwkRsp);
  }
  DataCenter zone=ApiDBUtils.findZoneById(vpc.getZoneId());
  if (zone != null) {
    response.setZoneId(zone.getUuid());
    response.setZoneName(zone.getName());
  }
  response.setNetworks(networkResponses);
  response.setServices(serviceResponses);
  populateOwner(response,vpc);
  List<? extends ResourceTag> tags=ApiDBUtils.listByResourceTypeAndId(ResourceObjectType.Vpc,vpc.getId());
  List<ResourceTagResponse> tagResponses=new ArrayList<ResourceTagResponse>();
  for (  ResourceTag tag : tags) {
    ResourceTagResponse tagResponse=createResourceTagResponse(tag,true);
    tagResponses.add(tagResponse);
  }
  response.setTags(tagResponses);
  response.setObjectName("String_Node_Str");
  return response;
}

Fixed version (ground truth):
@Override public VpcResponse createVpcResponse(ResponseView view,Vpc vpc){
  VpcResponse response=new VpcResponse();
  response.setId(vpc.getUuid());
  response.setName(vpc.getName());
  response.setDisplayText(vpc.getDisplayText());
  response.setState(vpc.getState().name());
  VpcOffering voff=ApiDBUtils.findVpcOfferingById(vpc.getVpcOfferingId());
  if (voff != null) {
    response.setVpcOfferingId(voff.getUuid());
  }
  response.setCidr(vpc.getCidr());
  response.setRestartRequired(vpc.isRestartRequired());
  response.setNetworkDomain(vpc.getNetworkDomain());
  response.setForDisplay(vpc.isDisplay());
  response.setUsesDistributedRouter(vpc.usesDistributedRouter());
  response.setRedundantRouter(vpc.isRedundant());
  response.setRegionLevelVpc(vpc.isRegionLevelVpc());
  Map<Service,Set<Provider>> serviceProviderMap=ApiDBUtils.listVpcOffServices(vpc.getVpcOfferingId());
  List<ServiceResponse> serviceResponses=new ArrayList<ServiceResponse>();
  for (  Map.Entry<Service,Set<Provider>> entry : serviceProviderMap.entrySet()) {
    Service service=entry.getKey();
    Set<Provider> serviceProviders=entry.getValue();
    ServiceResponse svcRsp=new ServiceResponse();
    if (service == Service.Gateway) {
      continue;
    }
    svcRsp.setName(service.getName());
    List<ProviderResponse> providers=new ArrayList<ProviderResponse>();
    for (    Provider provider : serviceProviders) {
      if (provider != null) {
        ProviderResponse providerRsp=new ProviderResponse();
        providerRsp.setName(provider.getName());
        providers.add(providerRsp);
      }
    }
    svcRsp.setProviders(providers);
    serviceResponses.add(svcRsp);
  }
  List<NetworkResponse> networkResponses=new ArrayList<NetworkResponse>();
  List<? extends Network> networks=ApiDBUtils.listVpcNetworks(vpc.getId());
  for (  Network network : networks) {
    NetworkResponse ntwkRsp=createNetworkResponse(view,network);
    networkResponses.add(ntwkRsp);
  }
  DataCenter zone=ApiDBUtils.findZoneById(vpc.getZoneId());
  if (zone != null) {
    response.setZoneId(zone.getUuid());
    response.setZoneName(zone.getName());
  }
  response.setNetworks(networkResponses);
  response.setServices(serviceResponses);
  populateOwner(response,vpc);
  List<? extends ResourceTag> tags=ApiDBUtils.listByResourceTypeAndId(ResourceObjectType.Vpc,vpc.getId());
  List<ResourceTagResponse> tagResponses=new ArrayList<ResourceTagResponse>();
  for (  ResourceTag tag : tags) {
    ResourceTagResponse tagResponse=createResourceTagResponse(tag,true);
    CollectionUtils.addIgnoreNull(tagResponses,tagResponse);
  }
  response.setTags(tagResponses);
  response.setObjectName("String_Node_Str");
  return response;
}