Program: 26546
Project: 26546
Buggy source:
@Override public void run(){
  Exception ex=null;
  try {
    UserGroupInformation user=UserGroupInformation.createRemoteUser(container.getId().toString());
    String cmIpPortStr=container.getNodeId().getHost() + "String_Node_Str" + container.getNodeId().getPort();
    final InetSocketAddress cmAddress=NetUtils.createSocketAddr(cmIpPortStr);
    org.apache.hadoop.yarn.api.records.Token containerToken=container.getContainerToken();
    if (containerToken != null) {
      Token<ContainerTokenIdentifier> token=ConverterUtils.convertFromYarn(containerToken,cmAddress);
      user.addToken(token);
    }
    log.debug("String_Node_Str",container.getId(),containerRole);
    ContainerLaunchContext ctx=Records.newRecord(ContainerLaunchContext.class);
    provider.buildContainerLaunchContext(ctx,fs,generatedConfDirPath,containerRole,clusterSpec,roleOptions);
    String commandLine=ctx.getCommands().get(0);
    RoleInstance instance=new RoleInstance(container);
    instance.buildUUID();
    log.info("String_Node_Str",HoyaUtils.join(ctx.getCommands(),"String_Node_Str"));
    Map<String,LocalResource> lr=ctx.getLocalResources();
    List<String> nodeEnv=new ArrayList<String>();
    if (log.isDebugEnabled()) {
      log.debug("String_Node_Str",lr.size());
      for (      Map.Entry<String,LocalResource> entry : lr.entrySet()) {
        String key=entry.getKey();
        LocalResource val=entry.getValue();
        String envElt=key + "String_Node_Str" + HoyaUtils.stringify(val.getResource());
        log.debug(envElt);
      }
    }
    Map<String,String> environment=ctx.getEnvironment();
    environment.putAll(envVars);
    log.debug("String_Node_Str",environment.size());
    for (    Map.Entry<String,String> env : environment.entrySet()) {
      String envElt=String.format("String_Node_Str",env.getKey(),env.getValue());
      log.debug(envElt);
      nodeEnv.add(envElt);
    }
    instance.command=HoyaUtils.join(ctx.getCommands(),"String_Node_Str");
    instance.role=containerRole;
    instance.roleId=role.id;
    instance.environment=nodeEnv.toArray(new String[nodeEnv.size()]);
    containerStarter.startContainer(container,ctx,instance);
  }
 catch (  Exception e) {
    log.error("String_Node_Str" + containerRole + "String_Node_Str"+ e,e);
    ex=e;
  }
 finally {
    launchedThreadCompleted(this,ex);
  }
}

Fixed version (ground truth):
@Override public void run(){
  Exception ex=null;
  try {
    UserGroupInformation user=UserGroupInformation.createRemoteUser(container.getId().toString());
    String cmIpPortStr=container.getNodeId().getHost() + "String_Node_Str" + container.getNodeId().getPort();
    final InetSocketAddress cmAddress=NetUtils.createSocketAddr(cmIpPortStr);
    org.apache.hadoop.yarn.api.records.Token containerToken=container.getContainerToken();
    if (containerToken != null) {
      Token<ContainerTokenIdentifier> token=ConverterUtils.convertFromYarn(containerToken,cmAddress);
      user.addToken(token);
    }
    log.debug("String_Node_Str",container.getId(),containerRole);
    ContainerLaunchContext ctx=Records.newRecord(ContainerLaunchContext.class);
    provider.buildContainerLaunchContext(ctx,fs,generatedConfDirPath,containerRole,clusterSpec,roleOptions);
    String commandLine=ctx.getCommands().get(0);
    RoleInstance instance=new RoleInstance(container);
    log.info("String_Node_Str",HoyaUtils.join(ctx.getCommands(),"String_Node_Str"));
    Map<String,LocalResource> lr=ctx.getLocalResources();
    List<String> nodeEnv=new ArrayList<String>();
    if (log.isDebugEnabled()) {
      log.debug("String_Node_Str",lr.size());
      for (      Map.Entry<String,LocalResource> entry : lr.entrySet()) {
        String key=entry.getKey();
        LocalResource val=entry.getValue();
        String envElt=key + "String_Node_Str" + HoyaUtils.stringify(val.getResource());
        log.debug(envElt);
      }
    }
    Map<String,String> environment=ctx.getEnvironment();
    environment.putAll(envVars);
    log.debug("String_Node_Str",environment.size());
    for (    Map.Entry<String,String> env : environment.entrySet()) {
      String envElt=String.format("String_Node_Str",env.getKey(),env.getValue());
      log.debug(envElt);
      nodeEnv.add(envElt);
    }
    instance.command=HoyaUtils.join(ctx.getCommands(),"String_Node_Str");
    instance.role=containerRole;
    instance.roleId=role.id;
    instance.environment=nodeEnv.toArray(new String[nodeEnv.size()]);
    containerStarter.startContainer(container,ctx,instance);
  }
 catch (  Exception e) {
    log.error("String_Node_Str" + containerRole + "String_Node_Str"+ e,e);
    ex=e;
  }
 finally {
    launchedThreadCompleted(this,ex);
  }
}