Program: 172903
Project: 172903
Buggy source:
/** 
 * initialize JobMasterClient wait until it connects to JobMaster return false, if it can not connec to JobMaster
 * @return
 */
public boolean init(){
  looper=new Progress();
  ClientConnectHandler connectHandler=new ClientConnectHandler();
  rrClient=new RRClient(masterAddress,masterPort,null,looper,thisWorker.getWorkerID(),connectHandler);
  long interval=JobMasterContext.pingInterval(config);
  pinger=new Pinger(thisWorker,rrClient,interval);
  workerController=new WorkerController(config,thisWorker,rrClient);
  Network.Ping.Builder pingBuilder=Network.Ping.newBuilder();
  rrClient.registerResponseHandler(pingBuilder,pinger);
  ListWorkersRequest.Builder listRequestBuilder=ListWorkersRequest.newBuilder();
  ListWorkersResponse.Builder listResponseBuilder=ListWorkersResponse.newBuilder();
  rrClient.registerResponseHandler(listRequestBuilder,workerController);
  rrClient.registerResponseHandler(listResponseBuilder,workerController);
  Network.WorkerStateChange.Builder stateChangeBuilder=Network.WorkerStateChange.newBuilder();
  Network.WorkerStateChangeResponse.Builder stateChangeResponseBuilder=Network.WorkerStateChangeResponse.newBuilder();
  ResponseMessageHandler responseMessageHandler=new ResponseMessageHandler();
  rrClient.registerResponseHandler(stateChangeBuilder,responseMessageHandler);
  rrClient.registerResponseHandler(stateChangeResponseBuilder,responseMessageHandler);
  long connectionTimeLimit=100000;
  tryUntilConnected(connectionTimeLimit);
  if (rrClient.isConnected()) {
    LOG.info("String_Node_Str");
  }
 else {
    LOG.severe("String_Node_Str");
    return false;
  }
  this.start();
  return true;
}

Fixed version (ground truth):
/** 
 * initialize JobMasterClient wait until it connects to JobMaster return false, if it can not connec to JobMaster
 * @return
 */
public boolean init(){
  looper=new Progress();
  ClientConnectHandler connectHandler=new ClientConnectHandler();
  rrClient=new RRClient(masterAddress,masterPort,null,looper,thisWorker.getWorkerID(),connectHandler);
  long interval=JobMasterContext.pingInterval(config);
  pinger=new Pinger(thisWorker,rrClient,interval);
  workerController=new WorkerController(config,thisWorker,rrClient,numberOfWorkers);
  Network.Ping.Builder pingBuilder=Network.Ping.newBuilder();
  rrClient.registerResponseHandler(pingBuilder,pinger);
  ListWorkersRequest.Builder listRequestBuilder=ListWorkersRequest.newBuilder();
  ListWorkersResponse.Builder listResponseBuilder=ListWorkersResponse.newBuilder();
  rrClient.registerResponseHandler(listRequestBuilder,workerController);
  rrClient.registerResponseHandler(listResponseBuilder,workerController);
  Network.WorkerStateChange.Builder stateChangeBuilder=Network.WorkerStateChange.newBuilder();
  Network.WorkerStateChangeResponse.Builder stateChangeResponseBuilder=Network.WorkerStateChangeResponse.newBuilder();
  ResponseMessageHandler responseMessageHandler=new ResponseMessageHandler();
  rrClient.registerResponseHandler(stateChangeBuilder,responseMessageHandler);
  rrClient.registerResponseHandler(stateChangeResponseBuilder,responseMessageHandler);
  long connectionTimeLimit=100000;
  tryUntilConnected(connectionTimeLimit);
  if (rrClient.isConnected()) {
    LOG.info("String_Node_Str");
  }
 else {
    LOG.severe("String_Node_Str");
    return false;
  }
  this.start();
  return true;
}