Program: 105206
Project: 105206
Buggy source:
@Override public FirewallRuleResponse createPortForwardingRuleResponse(PortForwardingRule fwRule){
  FirewallRuleResponse response=new FirewallRuleResponse();
  response.setId(fwRule.getUuid());
  response.setPrivateStartPort(Integer.toString(fwRule.getDestinationPortStart()));
  response.setPrivateEndPort(Integer.toString(fwRule.getDestinationPortEnd()));
  response.setProtocol(fwRule.getProtocol());
  response.setPublicStartPort(Integer.toString(fwRule.getSourcePortStart()));
  response.setPublicEndPort(Integer.toString(fwRule.getSourcePortEnd()));
  List<String> cidrs=ApiDBUtils.findFirewallSourceCidrs(fwRule.getId());
  response.setCidrList(StringUtils.join(cidrs,"String_Node_Str"));
  Network guestNtwk=ApiDBUtils.findNetworkById(fwRule.getNetworkId());
  response.setNetworkId(guestNtwk.getUuid());
  IpAddress ip=ApiDBUtils.findIpAddressById(fwRule.getSourceIpAddressId());
  if (ip != null) {
    response.setPublicIpAddressId(ip.getUuid());
    response.setPublicIpAddress(ip.getAddress().addr());
    if (fwRule.getDestinationIpAddress() != null) {
      response.setDestNatVmIp(fwRule.getDestinationIpAddress().toString());
      UserVm vm=ApiDBUtils.findUserVmById(fwRule.getVirtualMachineId());
      if (vm != null) {
        response.setVirtualMachineId(vm.getUuid());
        response.setVirtualMachineName(vm.getHostName());
        if (vm.getDisplayName() != null) {
          response.setVirtualMachineDisplayName(vm.getDisplayName());
        }
 else {
          response.setVirtualMachineDisplayName(vm.getHostName());
        }
      }
    }
  }
  FirewallRule.State state=fwRule.getState();
  String stateToSet=state.toString();
  if (state.equals(FirewallRule.State.Revoke)) {
    stateToSet="String_Node_Str";
  }
  List<? extends ResourceTag> tags=ApiDBUtils.listByResourceTypeAndId(ResourceObjectType.PortForwardingRule,fwRule.getId());
  List<ResourceTagResponse> tagResponses=new ArrayList<ResourceTagResponse>();
  for (  ResourceTag tag : tags) {
    ResourceTagResponse tagResponse=createResourceTagResponse(tag,true);
    tagResponses.add(tagResponse);
  }
  response.setTags(tagResponses);
  response.setState(stateToSet);
  response.setForDisplay(fwRule.isDisplay());
  response.setObjectName("String_Node_Str");
  return response;
}

Fixed version (ground truth):
@Override public FirewallRuleResponse createPortForwardingRuleResponse(PortForwardingRule fwRule){
  FirewallRuleResponse response=new FirewallRuleResponse();
  response.setId(fwRule.getUuid());
  response.setPrivateStartPort(Integer.toString(fwRule.getDestinationPortStart()));
  response.setPrivateEndPort(Integer.toString(fwRule.getDestinationPortEnd()));
  response.setProtocol(fwRule.getProtocol());
  response.setPublicStartPort(Integer.toString(fwRule.getSourcePortStart()));
  response.setPublicEndPort(Integer.toString(fwRule.getSourcePortEnd()));
  List<String> cidrs=ApiDBUtils.findFirewallSourceCidrs(fwRule.getId());
  response.setCidrList(StringUtils.join(cidrs,"String_Node_Str"));
  Network guestNtwk=ApiDBUtils.findNetworkById(fwRule.getNetworkId());
  response.setNetworkId(guestNtwk.getUuid());
  IpAddress ip=ApiDBUtils.findIpAddressById(fwRule.getSourceIpAddressId());
  if (ip != null) {
    response.setPublicIpAddressId(ip.getUuid());
    response.setPublicIpAddress(ip.getAddress().addr());
    if (fwRule.getDestinationIpAddress() != null) {
      response.setDestNatVmIp(fwRule.getDestinationIpAddress().toString());
      UserVm vm=ApiDBUtils.findUserVmById(fwRule.getVirtualMachineId());
      if (vm != null) {
        response.setVirtualMachineId(vm.getUuid());
        response.setVirtualMachineName(vm.getHostName());
        if (vm.getDisplayName() != null) {
          response.setVirtualMachineDisplayName(vm.getDisplayName());
        }
 else {
          response.setVirtualMachineDisplayName(vm.getHostName());
        }
      }
    }
  }
  FirewallRule.State state=fwRule.getState();
  String stateToSet=state.toString();
  if (state.equals(FirewallRule.State.Revoke)) {
    stateToSet="String_Node_Str";
  }
  List<? extends ResourceTag> tags=ApiDBUtils.listByResourceTypeAndId(ResourceObjectType.PortForwardingRule,fwRule.getId());
  List<ResourceTagResponse> tagResponses=new ArrayList<ResourceTagResponse>();
  for (  ResourceTag tag : tags) {
    ResourceTagResponse tagResponse=createResourceTagResponse(tag,true);
    CollectionUtils.addIgnoreNull(tagResponses,tagResponse);
  }
  response.setTags(tagResponses);
  response.setState(stateToSet);
  response.setForDisplay(fwRule.isDisplay());
  response.setObjectName("String_Node_Str");
  return response;
}