Program: 4697
Project: 4697
Buggy source:
@Override protected void startUp() throws Exception {
  try {
    server=new Server();
    try {
      bindAddress=InetAddress.getByName(cConfiguration.get(Constants.Security.AUTH_SERVER_BIND_ADDRESS));
    }
 catch (    UnknownHostException e) {
      LOG.error("String_Node_Str",e);
      throw e;
    }
    QueuedThreadPool threadPool=new QueuedThreadPool();
    threadPool.setMaxThreads(maxThreads);
    server.setThreadPool(threadPool);
    initHandlers();
    ServletContextHandler context=new ServletContextHandler();
    context.setServer(server);
    context.addServlet(HttpServletDispatcher.class,"String_Node_Str");
    context.addEventListener(new AuthenticationGuiceServletContextListener(handlers));
    context.setSecurityHandler(authenticationHandler);
    ContextHandler statusContext=new ContextHandler();
    statusContext.setContextPath(Constants.EndPoints.STATUS);
    statusContext.setServer(server);
    statusContext.setHandler(new StatusRequestHandler());
    if (cConfiguration.getBoolean(Constants.Security.SSL.EXTERNAL_ENABLED,false)) {
      SslContextFactory sslContextFactory=new SslContextFactory();
      String keyStorePath=sConfiguration.get(Constants.Security.AuthenticationServer.SSL_KEYSTORE_PATH);
      String keyStorePassword=sConfiguration.get(Constants.Security.AuthenticationServer.SSL_KEYSTORE_PASSWORD);
      String keyStoreType=sConfiguration.get(Constants.Security.AuthenticationServer.SSL_KEYSTORE_TYPE,Constants.Security.AuthenticationServer.DEFAULT_SSL_KEYSTORE_TYPE);
      String keyPassword=sConfiguration.get(Constants.Security.AuthenticationServer.SSL_KEYPASSWORD);
      Preconditions.checkArgument(keyStorePath != null,"String_Node_Str");
      Preconditions.checkArgument(keyStorePassword != null,"String_Node_Str");
      sslContextFactory.setKeyStorePath(keyStorePath);
      sslContextFactory.setKeyStorePassword(keyStorePassword);
      sslContextFactory.setKeyStoreType(keyStoreType);
      if (keyPassword != null && keyPassword.length() != 0) {
        sslContextFactory.setKeyManagerPassword(keyPassword);
      }
      String trustStorePath=cConfiguration.get(Constants.Security.AuthenticationServer.SSL_TRUSTSTORE_PATH);
      if (StringUtils.isNotEmpty(trustStorePath)) {
        String trustStorePassword=cConfiguration.get(Constants.Security.AuthenticationServer.SSL_TRUSTSTORE_PASSWORD);
        String trustStoreType=cConfiguration.get(Constants.Security.AuthenticationServer.SSL_TRUSTSTORE_TYPE,Constants.Security.AuthenticationServer.DEFAULT_SSL_KEYSTORE_TYPE);
        sslContextFactory.setWantClientAuth(true);
        sslContextFactory.setTrustStore(trustStorePath);
        sslContextFactory.setTrustStorePassword(trustStorePassword);
        sslContextFactory.setTrustStoreType(trustStoreType);
        sslContextFactory.setValidateCerts(true);
      }
      SslSelectChannelConnector sslConnector=new SslSelectChannelConnector(sslContextFactory);
      sslConnector.setHost(bindAddress.getCanonicalHostName());
      sslConnector.setPort(port);
      server.setConnectors(new Connector[]{sslConnector});
    }
 else {
      SelectChannelConnector connector=new SelectChannelConnector();
      connector.setHost(bindAddress.getCanonicalHostName());
      connector.setPort(port);
      server.setConnectors(new Connector[]{connector});
    }
    HandlerCollection handlers=new HandlerCollection();
    handlers.addHandler(statusContext);
    handlers.addHandler(context);
    handlers.addHandler(auditLogHandler);
    server.setHandler(handlers);
  }
 catch (  Exception e) {
    LOG.error("String_Node_Str",e);
  }
  try {
    server.start();
  }
 catch (  Exception e) {
    if ((Throwables.getRootCause(e) instanceof BindException)) {
      throw new ServiceBindException("String_Node_Str",bindAddress.getCanonicalHostName(),port,e);
    }
    throw e;
  }
  Connector connector=server.getConnectors()[0];
  InetSocketAddress inetSocketAddress=new InetSocketAddress(connector.getHost(),connector.getLocalPort());
  serviceCancellable=discoveryService.register(ResolvingDiscoverable.of(new Discoverable(Constants.Service.EXTERNAL_AUTHENTICATION,inetSocketAddress)));
}

Fixed version (ground truth):
@Override protected void startUp() throws Exception {
  server=new Server();
  InetAddress bindAddress=InetAddress.getByName(cConfiguration.get(Constants.Security.AUTH_SERVER_BIND_ADDRESS));
  QueuedThreadPool threadPool=new QueuedThreadPool();
  threadPool.setMaxThreads(maxThreads);
  server.setThreadPool(threadPool);
  initHandlers();
  ServletContextHandler context=new ServletContextHandler();
  context.setServer(server);
  context.addServlet(HttpServletDispatcher.class,"String_Node_Str");
  context.addEventListener(new AuthenticationGuiceServletContextListener(handlers));
  context.setSecurityHandler(authenticationHandler);
  ContextHandler statusContext=new ContextHandler();
  statusContext.setContextPath(Constants.EndPoints.STATUS);
  statusContext.setServer(server);
  statusContext.setHandler(new StatusRequestHandler());
  if (cConfiguration.getBoolean(Constants.Security.SSL.EXTERNAL_ENABLED,false)) {
    SslContextFactory sslContextFactory=new SslContextFactory();
    String keyStorePath=sConfiguration.get(Constants.Security.AuthenticationServer.SSL_KEYSTORE_PATH);
    String keyStorePassword=sConfiguration.get(Constants.Security.AuthenticationServer.SSL_KEYSTORE_PASSWORD);
    String keyStoreType=sConfiguration.get(Constants.Security.AuthenticationServer.SSL_KEYSTORE_TYPE,Constants.Security.AuthenticationServer.DEFAULT_SSL_KEYSTORE_TYPE);
    String keyPassword=sConfiguration.get(Constants.Security.AuthenticationServer.SSL_KEYPASSWORD);
    Preconditions.checkArgument(keyStorePath != null,"String_Node_Str");
    Preconditions.checkArgument(keyStorePassword != null,"String_Node_Str");
    sslContextFactory.setKeyStorePath(keyStorePath);
    sslContextFactory.setKeyStorePassword(keyStorePassword);
    sslContextFactory.setKeyStoreType(keyStoreType);
    if (keyPassword != null && keyPassword.length() != 0) {
      sslContextFactory.setKeyManagerPassword(keyPassword);
    }
    String trustStorePath=cConfiguration.get(Constants.Security.AuthenticationServer.SSL_TRUSTSTORE_PATH);
    if (StringUtils.isNotEmpty(trustStorePath)) {
      String trustStorePassword=cConfiguration.get(Constants.Security.AuthenticationServer.SSL_TRUSTSTORE_PASSWORD);
      String trustStoreType=cConfiguration.get(Constants.Security.AuthenticationServer.SSL_TRUSTSTORE_TYPE,Constants.Security.AuthenticationServer.DEFAULT_SSL_KEYSTORE_TYPE);
      sslContextFactory.setWantClientAuth(true);
      sslContextFactory.setTrustStore(trustStorePath);
      sslContextFactory.setTrustStorePassword(trustStorePassword);
      sslContextFactory.setTrustStoreType(trustStoreType);
      sslContextFactory.setValidateCerts(true);
    }
    SslSelectChannelConnector sslConnector=new SslSelectChannelConnector(sslContextFactory);
    sslConnector.setHost(bindAddress.getCanonicalHostName());
    sslConnector.setPort(port);
    server.setConnectors(new Connector[]{sslConnector});
  }
 else {
    SelectChannelConnector connector=new SelectChannelConnector();
    connector.setHost(bindAddress.getCanonicalHostName());
    connector.setPort(port);
    server.setConnectors(new Connector[]{connector});
  }
  HandlerCollection handlers=new HandlerCollection();
  handlers.addHandler(statusContext);
  handlers.addHandler(context);
  handlers.addHandler(auditLogHandler);
  server.setHandler(handlers);
  try {
    server.start();
  }
 catch (  Exception e) {
    if ((Throwables.getRootCause(e) instanceof BindException)) {
      throw new ServiceBindException("String_Node_Str",bindAddress.getCanonicalHostName(),port,e);
    }
    throw e;
  }
  Connector connector=server.getConnectors()[0];
  InetSocketAddress inetSocketAddress=new InetSocketAddress(connector.getHost(),connector.getLocalPort());
  serviceCancellable=discoveryService.register(ResolvingDiscoverable.of(new Discoverable(Constants.Service.EXTERNAL_AUTHENTICATION,inetSocketAddress)));
}