Program: 28146
Project: 28146
Buggy source:
void addProbes(boolean globalAccessLoggingEnabled){
  List<String> listenerList=StringUtils.parseStringList(vsBean.getNetworkListeners(),"String_Node_Str");
  String[] listeners=(listenerList != null) ? listenerList.toArray(new String[listenerList.size()]) : new String[0];
  List<NetworkListener> networkListeners=new ArrayList<NetworkListener>();
  for (  String listener : listeners) {
    for (    NetworkListener networkListener : serverConfig.getNetworkConfig().getNetworkListeners().getNetworkListener()) {
      if (networkListener.getName().equals(listener)) {
        networkListeners.add(networkListener);
      }
    }
  }
  for (  final NetworkListener listener : networkListeners) {
    try {
      final GrizzlyProxy proxy=(GrizzlyProxy)grizzlyService.lookupNetworkProxy(listener);
      if (proxy != null) {
        GenericGrizzlyListener grizzlyListener=(GenericGrizzlyListener)proxy.getUnderlyingListener();
        List<HttpCodecFilter> codecFilters=grizzlyListener.getFilters(HttpCodecFilter.class);
        if (codecFilters == null || codecFilters.isEmpty()) {
          if (grizzlyListener.isAjpEnabled()) {
            continue;
          }
          _logger.log(Level.SEVERE,LogFacade.CODE_FILTERS_NULL,new Object[]{listener.getName(),codecFilters});
        }
 else {
          for (          HttpCodecFilter codecFilter : codecFilters) {
            if (codecFilter.getMonitoringConfig().getProbes().length == 0) {
              httpProbe=new HttpProbeImpl(listener,isAccessLoggingEnabled(globalAccessLoggingEnabled));
              codecFilter.getMonitoringConfig().addProbes(httpProbe);
            }
          }
        }
        grizzlyListener.getTransport().getConnectionMonitoringConfig().addProbes(new ConnectionProbe.Adapter(){
          RequestProbeProvider requestProbeProvider=webContainer.getRequestProbeProvider();
          @Override public void onReadEvent(          Connection connection,          Buffer data,          int size){
            if (requestProbeProvider != null) {
              requestProbeProvider.dataReceivedEvent(size);
            }
          }
          @Override public void onWriteEvent(          Connection connection,          Buffer data,          long size){
            if (requestProbeProvider != null) {
              requestProbeProvider.dataSentEvent(size);
            }
          }
        }
);
      }
 else {
        if (Boolean.parseBoolean(listener.getEnabled())) {
          _logger.log(Level.SEVERE,LogFacade.PROXY_NULL,new Object[]{listener.getName()});
        }
      }
    }
 catch (    Exception ex) {
      _logger.log(Level.SEVERE,LogFacade.ADD_HTTP_PROBES_ERROR,ex);
    }
  }
}

Fixed version (ground truth):
void addProbes(boolean globalAccessLoggingEnabled){
  for (  final NetworkListener listener : getGrizzlyNetworkListeners()) {
    try {
      final GrizzlyProxy proxy=(GrizzlyProxy)grizzlyService.lookupNetworkProxy(listener);
      if (proxy != null) {
        GenericGrizzlyListener grizzlyListener=(GenericGrizzlyListener)proxy.getUnderlyingListener();
        List<HttpCodecFilter> codecFilters=grizzlyListener.getFilters(HttpCodecFilter.class);
        if (codecFilters == null || codecFilters.isEmpty()) {
          if (grizzlyListener.isAjpEnabled()) {
            continue;
          }
          _logger.log(Level.SEVERE,LogFacade.CODE_FILTERS_NULL,new Object[]{listener.getName(),codecFilters});
        }
 else {
          for (          HttpCodecFilter codecFilter : codecFilters) {
            if (codecFilter.getMonitoringConfig().getProbes().length == 0) {
              HttpProbeImpl httpProbe=new HttpProbeImpl(listener,isAccessLoggingEnabled(globalAccessLoggingEnabled));
              codecFilter.getMonitoringConfig().addProbes(httpProbe);
            }
          }
        }
        grizzlyListener.getTransport().getConnectionMonitoringConfig().addProbes(new ConnectionProbe.Adapter(){
          RequestProbeProvider requestProbeProvider=webContainer.getRequestProbeProvider();
          @Override public void onReadEvent(          Connection connection,          Buffer data,          int size){
            if (requestProbeProvider != null) {
              requestProbeProvider.dataReceivedEvent(size);
            }
          }
          @Override public void onWriteEvent(          Connection connection,          Buffer data,          long size){
            if (requestProbeProvider != null) {
              requestProbeProvider.dataSentEvent(size);
            }
          }
        }
);
      }
 else {
        if (Boolean.parseBoolean(listener.getEnabled())) {
          _logger.log(Level.SEVERE,LogFacade.PROXY_NULL,new Object[]{listener.getName()});
        }
      }
    }
 catch (    Exception ex) {
      _logger.log(Level.SEVERE,LogFacade.ADD_HTTP_PROBES_ERROR,ex);
    }
  }
}