Program: 30107
Project: 30107
Buggy source:
public WebServerInfo getWebServerInfoForDAS(){
  WebServerInfo wsi=new WebServerInfo();
  if (this.networkListeners == null) {
    List<Integer> adminPorts=new ArrayList<Integer>();
    for (    org.glassfish.api.container.Adapter subAdapter : habitat.getAllByContract(org.glassfish.api.container.Adapter.class)) {
      if (subAdapter instanceof AdminAdapter) {
        AdminAdapter aa=(AdminAdapter)subAdapter;
        adminPorts.add(aa.getListenPort());
      }
 else       if (subAdapter instanceof AdminConsoleAdapter) {
        AdminConsoleAdapter aca=(AdminConsoleAdapter)subAdapter;
        adminPorts.add(aca.getListenPort());
      }
    }
    for (    NetworkListener nl : config.getNetworkConfig().getNetworkListeners().getNetworkListener()) {
      if (!adminPorts.contains(Integer.valueOf(nl.getPort()))) {
        if (networkListeners == null)         networkListeners=new ArrayList<NetworkListener>();
        networkListeners.add(nl);
      }
    }
  }
  for (  NetworkListener listener : networkListeners) {
    String host=listener.getAddress();
    if (listener.getAddress().equals("String_Node_Str"))     try {
      host=InetAddress.getLocalHost().getHostName();
    }
 catch (    UnknownHostException e) {
      host="String_Node_Str";
    }
 else {
    }
    if (listener.findHttpProtocol().getSecurityEnabled().equals("String_Node_Str"))     wsi.setHttpVS(new VirtualServerInfo("String_Node_Str",host,Integer.parseInt(listener.getPort())));
 else     if (listener.findHttpProtocol().getSecurityEnabled().equals("String_Node_Str"))     wsi.setHttpsVS(new VirtualServerInfo("String_Node_Str",host,Integer.parseInt(listener.getPort())));
  }
  return wsi;
}

Fixed version (ground truth):
public WebServerInfo getWebServerInfoForDAS(){
  WebServerInfo wsi=new WebServerInfo();
  if (this.networkListeners == null) {
    List<Integer> adminPorts=new ArrayList<Integer>();
    for (    org.glassfish.api.container.Adapter subAdapter : habitat.getAllByContract(org.glassfish.api.container.Adapter.class)) {
      if (subAdapter instanceof AdminAdapter) {
        AdminAdapter aa=(AdminAdapter)subAdapter;
        adminPorts.add(aa.getListenPort());
      }
 else       if (subAdapter instanceof AdminConsoleAdapter) {
        AdminConsoleAdapter aca=(AdminConsoleAdapter)subAdapter;
        adminPorts.add(aca.getListenPort());
      }
    }
    for (    NetworkListener nl : config.getNetworkConfig().getNetworkListeners().getNetworkListener()) {
      if (!adminPorts.contains(Integer.valueOf(nl.getPort()))) {
        if (networkListeners == null)         networkListeners=new ArrayList<NetworkListener>();
        networkListeners.add(nl);
      }
    }
  }
  if ((networkListeners != null) && (!networkListeners.isEmpty())) {
    for (    NetworkListener listener : networkListeners) {
      String host=listener.getAddress();
      if (listener.getAddress().equals("String_Node_Str"))       try {
        host=InetAddress.getLocalHost().getHostName();
      }
 catch (      UnknownHostException e) {
        host="String_Node_Str";
      }
      if (listener.findHttpProtocol().getSecurityEnabled().equals("String_Node_Str"))       wsi.setHttpVS(new VirtualServerInfo("String_Node_Str",host,Integer.parseInt(listener.getPort())));
 else       if (listener.findHttpProtocol().getSecurityEnabled().equals("String_Node_Str"))       wsi.setHttpsVS(new VirtualServerInfo("String_Node_Str",host,Integer.parseInt(listener.getPort())));
    }
  }
 else {
    wsi.setHttpVS(new VirtualServerInfo("String_Node_Str","String_Node_Str",0));
  }
  return wsi;
}