Program: 172899
Project: 172899
Buggy source:
/** 
 * Create the resource plan
 * @param config config
 * @return
 */
private static ResourcePlan createResourcePlan(Config config){
  String indexEnv=System.getenv("String_Node_Str");
  String idEnv=System.getenv("String_Node_Str");
  int index=Integer.valueOf(indexEnv);
  initLogger(config,index);
  LOG.log(Level.INFO,String.format("String_Node_Str",idEnv,index));
  ResourcePlan resourcePlan=new ResourcePlan("String_Node_Str",index);
  Map<String,Integer> ports=getPorts(config);
  JobMasterClient client=null;
  String jobMasterIP=JobMasterContext.jobMasterIP(config);
  int masterPort=JobMasterContext.jobMasterPort(config);
  TCPChannel channel;
  try {
    Integer workerPort=ports.get("String_Node_Str");
    String localIp=getIPAddress();
    channel=initNetworkServer(config,new WorkerNetworkInfo(InetAddress.getByName(localIp),workerPort,index),index);
    client=createMasterClient(config,index,localIp,workerPort,masterPort,jobMasterIP);
  }
 catch (  UnknownHostException e) {
    throw new RuntimeException("String_Node_Str" + jobMasterIP,e);
  }
  WorkerController workerController=client.getWorkerController();
  workerController.waitForAllWorkersToJoin(30000);
  List<WorkerNetworkInfo> wInfo=workerController.getWorkerList();
  List<NetworkInfo> nInfos=new ArrayList<>();
  for (  WorkerNetworkInfo w : wInfo) {
    ResourceContainer container=new ResourceContainer(w.getWorkerID());
    resourcePlan.addContainer(container);
    NetworkInfo networkInfo=new NetworkInfo(w.getWorkerID());
    networkInfo.addProperty(TCPContext.NETWORK_PORT,w.getWorkerPort());
    networkInfo.addProperty(TCPContext.NETWORK_HOSTNAME,w.getWorkerIP().toString());
    nInfos.add(networkInfo);
  }
  channel.startConnections(nInfos,null);
  return resourcePlan;
}

Fixed version (ground truth):
/** 
 * Create the resource plan
 * @param config config
 * @return
 */
private static ResourcePlan createResourcePlan(Config config){
  String indexEnv=System.getenv("String_Node_Str");
  String idEnv=System.getenv("String_Node_Str");
  int index=Integer.valueOf(indexEnv);
  initLogger(config,index);
  LOG.log(Level.INFO,String.format("String_Node_Str",idEnv,index));
  ResourcePlan resourcePlan=new ResourcePlan("String_Node_Str",index);
  Map<String,Integer> ports=getPorts(config);
  JobMasterClient client=null;
  String jobMasterIP=JobMasterContext.jobMasterIP(config);
  int masterPort=JobMasterContext.jobMasterPort(config);
  TCPChannel channel;
  try {
    Integer workerPort=ports.get("String_Node_Str");
    String localIp=getIPAddress();
    channel=initNetworkServer(config,new WorkerNetworkInfo(InetAddress.getByName(localIp),workerPort,index),index);
    client=createMasterClient(config,index,localIp,workerPort,masterPort,jobMasterIP);
  }
 catch (  UnknownHostException e) {
    throw new RuntimeException("String_Node_Str" + jobMasterIP,e);
  }
  WorkerController workerController=client.getWorkerController();
  workerController.waitForAllWorkersToJoin(30000);
  List<WorkerNetworkInfo> wInfo=workerController.getWorkerList();
  List<NetworkInfo> nInfos=new ArrayList<>();
  for (  WorkerNetworkInfo w : wInfo) {
    ResourceContainer container=new ResourceContainer(w.getWorkerID());
    resourcePlan.addContainer(container);
    NetworkInfo networkInfo=new NetworkInfo(w.getWorkerID());
    networkInfo.addProperty(TCPContext.NETWORK_PORT,w.getWorkerPort());
    networkInfo.addProperty(TCPContext.NETWORK_HOSTNAME,w.getWorkerIP().toString());
    nInfos.add(networkInfo);
  }
  channel.startConnections(nInfos,null);
  channel.waitForConnections();
  return resourcePlan;
}