Program: 7627
Project: 7627
Buggy source:
/** 
 * Configures the AppFabricService pre-start.
 */
@Override protected void startUp() throws Exception {
  executor=Executors.newFixedThreadPool(THREAD_COUNT,Threads.createDaemonThreadFactory("String_Node_Str"));
  schedulerService.start();
  InetSocketAddress socketAddress=new InetSocketAddress(hostname,port);
  InetAddress address=socketAddress.getAddress();
  if (address.isAnyLocalAddress()) {
    address=InetAddress.getLocalHost();
  }
  final InetSocketAddress finalSocketAddress=new InetSocketAddress(address,port);
  discoveryService.register(new Discoverable(){
    @Override public String getName(){
      return Constants.Service.APP_FABRIC;
    }
    @Override public InetSocketAddress getSocketAddress(){
      return finalSocketAddress;
    }
  }
);
  InetSocketAddress httpSocketAddress=new InetSocketAddress(httpHostName,httpPort);
  InetAddress httpAddress=socketAddress.getAddress();
  if (httpAddress.isAnyLocalAddress()) {
    httpAddress=InetAddress.getLocalHost();
  }
  final InetSocketAddress finalHttpSocketAddress=new InetSocketAddress(httpAddress,httpPort);
  discoveryService.register(new Discoverable(){
    @Override public String getName(){
      return Constants.Service.APP_FABRIC_HTTP;
    }
    @Override public InetSocketAddress getSocketAddress(){
      return finalHttpSocketAddress;
    }
  }
);
  TThreadedSelectorServer.Args options=new TThreadedSelectorServer.Args(new TNonblockingServerSocket(socketAddress)).executorService(executor).processor(new AppFabricService.Processor<AppFabricService.Iface>(service)).workerThreads(THREAD_COUNT);
  options.maxReadBufferBytes=Constants.Thrift.DEFAULT_MAX_READ_BUFFER;
  server=new TThreadedSelectorServer(options);
  httpService=NettyHttpService.builder().setPort(httpPort).addHttpHandlers(handlers).build();
}

Fixed version (ground truth):
/** 
 * Configures the AppFabricService pre-start.
 */
@Override protected void startUp() throws Exception {
  executor=Executors.newFixedThreadPool(THREAD_COUNT,Threads.createDaemonThreadFactory("String_Node_Str"));
  schedulerService.start();
  InetSocketAddress socketAddress=new InetSocketAddress(hostname,port);
  InetAddress address=socketAddress.getAddress();
  if (address.isAnyLocalAddress()) {
    address=InetAddress.getLocalHost();
  }
  final InetSocketAddress finalSocketAddress=new InetSocketAddress(address,port);
  discoveryService.register(new Discoverable(){
    @Override public String getName(){
      return Constants.Service.APP_FABRIC;
    }
    @Override public InetSocketAddress getSocketAddress(){
      return finalSocketAddress;
    }
  }
);
  InetSocketAddress httpSocketAddress=new InetSocketAddress(hostname,httpPort);
  InetAddress httpAddress=socketAddress.getAddress();
  if (httpAddress.isAnyLocalAddress()) {
    httpAddress=InetAddress.getLocalHost();
  }
  final InetSocketAddress finalHttpSocketAddress=new InetSocketAddress(httpAddress,httpPort);
  discoveryService.register(new Discoverable(){
    @Override public String getName(){
      return Constants.Service.APP_FABRIC_HTTP;
    }
    @Override public InetSocketAddress getSocketAddress(){
      return finalHttpSocketAddress;
    }
  }
);
  TThreadedSelectorServer.Args options=new TThreadedSelectorServer.Args(new TNonblockingServerSocket(socketAddress)).executorService(executor).processor(new AppFabricService.Processor<AppFabricService.Iface>(service)).workerThreads(THREAD_COUNT);
  options.maxReadBufferBytes=Constants.Thrift.DEFAULT_MAX_READ_BUFFER;
  server=new TThreadedSelectorServer(options);
  httpService=NettyHttpService.builder().setHost(hostname.getHostName()).setPort(httpPort).addHttpHandlers(handlers).build();
}