Program: 28477
Project: 28477
Buggy source:
public synchronized Future<Result<Thread>> createNetworkProxy(NetworkListener listener){
  if (!Boolean.valueOf(listener.getEnabled())) {
    addChangeListener(listener);
    logger.log(Level.INFO,KernelLoggerInfo.grizzlyPortDisabled,new Object[]{listener.getName(),listener.getPort()});
    return null;
  }
  GrizzlyProxy proxy=new GrizzlyProxy(this,listener);
  Future<Result<Thread>> future=null;
  try {
    proxy.initialize();
    if (!"String_Node_Str".equals(listener.getProtocol())) {
      final NetworkConfig networkConfig=listener.getParent(NetworkListeners.class).getParent(NetworkConfig.class);
      for (      VirtualServer vs : networkConfig.getParent(Config.class).getHttpService().getVirtualServer()) {
        List<String> vsListeners=StringUtils.parseStringList(vs.getNetworkListeners(),"String_Node_Str");
        if (vsListeners == null || vsListeners.isEmpty() || vsListeners.contains(listener.getName())) {
          if (!hosts.contains(vs.getId())) {
            hosts.add(vs.getId());
          }
        }
      }
      addChangeListener(listener);
      addChangeListener(listener.findThreadPool());
      addChangeListener(listener.findTransport());
      final Protocol protocol=listener.findHttpProtocol();
      if (protocol != null) {
        addChangeListener(protocol);
        addChangeListener(protocol.getHttp());
        addChangeListener(protocol.getHttp().getFileCache());
        addChangeListener(protocol.getSsl());
      }
    }
    future=proxy.start();
    proxies.add(proxy);
  }
 catch (  Throwable e) {
    final Future<Result<Thread>> errorFuture=Futures.createReadyFuture(new Result<Thread>(e));
    future=errorFuture;
  }
 finally {
    if (future == null) {
      final FutureImpl<Result<Thread>> errorFuture=UnsafeFutureImpl.create();
      errorFuture.result(new Result<Thread>(new IllegalStateException("String_Node_Str")));
      future=errorFuture;
    }
    futures.add(future);
  }
  return future;
}

Fixed version (ground truth):
public synchronized Future<Result<Thread>> createNetworkProxy(NetworkListener listener){
  if (!Boolean.valueOf(listener.getEnabled())) {
    addChangeListener(listener);
    LOGGER.log(Level.INFO,KernelLoggerInfo.grizzlyPortDisabled,new Object[]{listener.getName(),listener.getPort()});
    return null;
  }
  GrizzlyProxy proxy=new GrizzlyProxy(this,listener);
  Future<Result<Thread>> future=null;
  try {
    proxy.initialize();
    if (!"String_Node_Str".equals(listener.getProtocol())) {
      final NetworkConfig networkConfig=listener.getParent(NetworkListeners.class).getParent(NetworkConfig.class);
      for (      VirtualServer vs : networkConfig.getParent(Config.class).getHttpService().getVirtualServer()) {
        List<String> vsListeners=StringUtils.parseStringList(vs.getNetworkListeners(),"String_Node_Str");
        if (vsListeners == null || vsListeners.isEmpty() || vsListeners.contains(listener.getName())) {
          if (!hosts.contains(vs.getId())) {
            hosts.add(vs.getId());
          }
        }
      }
      addChangeListener(listener);
      addChangeListener(listener.findThreadPool());
      addChangeListener(listener.findTransport());
      final Protocol protocol=listener.findHttpProtocol();
      if (protocol != null) {
        addChangeListener(protocol);
        addChangeListener(protocol.getHttp());
        addChangeListener(protocol.getHttp().getFileCache());
        addChangeListener(protocol.getSsl());
      }
    }
    future=proxy.start();
    proxies.add(proxy);
  }
 catch (  Throwable e) {
    final Future<Result<Thread>> errorFuture=Futures.createReadyFuture(new Result<Thread>(e));
    future=errorFuture;
  }
 finally {
    if (future == null) {
      final FutureImpl<Result<Thread>> errorFuture=Futures.<Result<Thread>>createUnsafeFuture();
      errorFuture.result(new Result<Thread>(new IllegalStateException("String_Node_Str")));
      future=errorFuture;
    }
    futures.add(future);
  }
  return future;
}