Program: 113596
Project: 113596
Buggy source:
public DIRRequestDispatcher(final DIRConfig config) throws IOException, BabuDBException {
  super("String_Node_Str");
  this.config=config;
  Logging.logMessage(Logging.LEVEL_INFO,this,"String_Node_Str" + VersionManagement.RELEASE_VERSION);
  registry=new HashMap();
  database=BabuDBFactory.createBabuDB(new BabuDBConfig(config.getDbDir(),config.getDbDir(),0,1024 * 1024 * 16,60 * 5,SyncMode.FSYNC,200,500));
  dbMan=database.getDatabaseManager();
  initializeDatabase();
  registerOperations();
  SSLOptions sslOptions=null;
  if (config.isUsingSSL()) {
    sslOptions=new SSLOptions(new FileInputStream(config.getServiceCredsFile()),config.getServiceCredsPassphrase(),config.getServiceCredsContainer(),new FileInputStream(config.getTrustedCertsFile()),config.getTrustedCertsPassphrase(),config.getTrustedCertsContainer(),false);
  }
  queue=new LinkedBlockingQueue();
  quit=false;
  server=new RPCNIOSocketServer(config.getPort(),null,this,sslOptions);
  if (config.isAutodiscoverEnabled()) {
    discoveryThr=new DiscoveryMsgThread(InetAddress.getLocalHost().getCanonicalHostName(),config.getPort(),config.isUsingSSL() ? "String_Node_Str" : "String_Node_Str");
    discoveryThr.setLifeCycleListener(this);
  }
 else {
    discoveryThr=null;
  }
  httpServ=HttpServer.create(new InetSocketAddress(config.getHttpPort()),0);
  httpServ.createContext("String_Node_Str",new HttpHandler(){
    public void handle(    HttpExchange httpExchange) throws IOException {
      byte[] content;
      try {
        content=StatusPage.getStatusPage(DIRRequestDispatcher.this,config).getBytes("String_Node_Str");
        httpExchange.sendResponseHeaders(200,content.length);
        httpExchange.getResponseBody().write(content);
        httpExchange.getResponseBody().close();
      }
 catch (      BabuDBException ex) {
        ex.printStackTrace();
        httpExchange.sendResponseHeaders(500,0);
      }
    }
  }
);
  httpServ.start();
  numRequests=0;
  if (config.isMonitoringEnabled()) {
    monThr=new MonitoringThread(config,this);
    monThr.setLifeCycleListener(this);
  }
 else {
    monThr=null;
  }
}

Fixed version (ground truth):
public DIRRequestDispatcher(final DIRConfig config) throws IOException, BabuDBException {
  super("String_Node_Str");
  this.config=config;
  Logging.logMessage(Logging.LEVEL_INFO,this,"String_Node_Str" + VersionManagement.RELEASE_VERSION);
  registry=new HashMap();
  database=BabuDBFactory.createBabuDB(new BabuDBConfig(config.getDbDir(),config.getDbDir(),0,1024 * 1024 * 16,60 * 5,SyncMode.FSYNC,200,500));
  dbMan=database.getDatabaseManager();
  initializeDatabase();
  registerOperations();
  SSLOptions sslOptions=null;
  if (config.isUsingSSL()) {
    sslOptions=new SSLOptions(new FileInputStream(config.getServiceCredsFile()),config.getServiceCredsPassphrase(),config.getServiceCredsContainer(),new FileInputStream(config.getTrustedCertsFile()),config.getTrustedCertsPassphrase(),config.getTrustedCertsContainer(),false);
  }
  queue=new LinkedBlockingQueue();
  quit=false;
  server=new RPCNIOSocketServer(config.getPort(),config.getAddress(),this,sslOptions);
  if (config.isAutodiscoverEnabled()) {
    discoveryThr=new DiscoveryMsgThread(InetAddress.getLocalHost().getCanonicalHostName(),config.getPort(),config.isUsingSSL() ? "String_Node_Str" : "String_Node_Str");
    discoveryThr.setLifeCycleListener(this);
  }
 else {
    discoveryThr=null;
  }
  httpServ=HttpServer.create(new InetSocketAddress(config.getHttpPort()),0);
  httpServ.createContext("String_Node_Str",new HttpHandler(){
    public void handle(    HttpExchange httpExchange) throws IOException {
      byte[] content;
      try {
        content=StatusPage.getStatusPage(DIRRequestDispatcher.this,config).getBytes("String_Node_Str");
        httpExchange.sendResponseHeaders(200,content.length);
        httpExchange.getResponseBody().write(content);
        httpExchange.getResponseBody().close();
      }
 catch (      BabuDBException ex) {
        ex.printStackTrace();
        httpExchange.sendResponseHeaders(500,0);
      }
    }
  }
);
  httpServ.start();
  numRequests=0;
  if (config.isMonitoringEnabled()) {
    monThr=new MonitoringThread(config,this);
    monThr.setLifeCycleListener(this);
  }
 else {
    monThr=null;
  }
}