Program: 5270
Project: 5270
Buggy source:
private Map<String,String> doStartSession(@Nullable NamespaceId namespace,@Nullable Map<String,String> additionalSessionConf) throws IOException, ExploreException, NamespaceNotFoundException {
  Map<String,String> sessionConf=new HashMap<>();
  QueryHandle queryHandle=QueryHandle.generate();
  sessionConf.put(Constants.Explore.QUERY_ID,queryHandle.getHandle());
  String schedulerQueue=namespace != null ? schedulerQueueResolver.getQueue(namespace.toId()) : schedulerQueueResolver.getDefaultQueue();
  if (schedulerQueue != null && !schedulerQueue.isEmpty()) {
    sessionConf.put(JobContext.QUEUE_NAME,schedulerQueue);
  }
  Transaction tx=startTransaction();
  ConfigurationUtil.set(sessionConf,Constants.Explore.TX_QUERY_KEY,TxnCodec.INSTANCE,tx);
  ConfigurationUtil.set(sessionConf,Constants.Explore.CCONF_KEY,CConfCodec.INSTANCE,cConf);
  ConfigurationUtil.set(sessionConf,Constants.Explore.HCONF_KEY,HConfCodec.INSTANCE,hConf);
  HiveConf hiveConf=getHiveConf();
  if (ExploreServiceUtils.isSparkEngine(hiveConf,additionalSessionConf)) {
    sessionConf.putAll(sparkConf);
  }
  if (UserGroupInformation.isSecurityEnabled()) {
    sessionConf.put("String_Node_Str","String_Node_Str");
    sessionConf.put("String_Node_Str","String_Node_Str");
    File credentialsFile=writeCredentialsFile(queryHandle);
    String credentialsFilePath=credentialsFile.getAbsolutePath();
    sessionConf.put(MRJobConfig.MAPREDUCE_JOB_CREDENTIALS_BINARY,credentialsFilePath);
    sessionConf.put(CommonConfigurationKeysPublic.HADOOP_SECURITY_AUTHENTICATION,UserGroupInformation.AuthenticationMethod.KERBEROS.name());
    sessionConf.put("String_Node_Str",Boolean.FALSE.toString());
    sessionConf.put("String_Node_Str",Boolean.FALSE.toString());
    if (ExploreServiceUtils.isTezEngine(hiveConf,additionalSessionConf)) {
      sessionConf.put("String_Node_Str",credentialsFilePath);
    }
  }
  if (additionalSessionConf != null) {
    sessionConf.putAll(additionalSessionConf);
  }
  return sessionConf;
}

Fixed version (ground truth):
private Map<String,String> doStartSession(@Nullable NamespaceId namespace,@Nullable Map<String,String> additionalSessionConf) throws IOException, ExploreException, NamespaceNotFoundException {
  Map<String,String> sessionConf=new HashMap<>();
  QueryHandle queryHandle=QueryHandle.generate();
  sessionConf.put(Constants.Explore.QUERY_ID,queryHandle.getHandle());
  String schedulerQueue=namespace != null ? schedulerQueueResolver.getQueue(namespace.toId()) : schedulerQueueResolver.getDefaultQueue();
  if (schedulerQueue != null && !schedulerQueue.isEmpty()) {
    sessionConf.put(JobContext.QUEUE_NAME,schedulerQueue);
  }
  Transaction tx=startTransaction();
  ConfigurationUtil.set(sessionConf,Constants.Explore.TX_QUERY_KEY,TxnCodec.INSTANCE,tx);
  ConfigurationUtil.set(sessionConf,Constants.Explore.CCONF_KEY,CConfCodec.INSTANCE,cConf);
  ConfigurationUtil.set(sessionConf,Constants.Explore.HCONF_KEY,HConfCodec.INSTANCE,hConf);
  HiveConf hiveConf=getHiveConf();
  if (ExploreServiceUtils.isSparkEngine(hiveConf,additionalSessionConf)) {
    sessionConf.putAll(sparkConf);
  }
  if (UserGroupInformation.isSecurityEnabled()) {
    sessionConf.put("String_Node_Str","String_Node_Str");
    sessionConf.put("String_Node_Str","String_Node_Str");
    File credentialsFile=writeCredentialsFile(queryHandle);
    String credentialsFilePath=credentialsFile.getAbsolutePath();
    sessionConf.put(MRJobConfig.MAPREDUCE_JOB_CREDENTIALS_BINARY,credentialsFilePath);
    sessionConf.put(CommonConfigurationKeysPublic.HADOOP_SECURITY_AUTHENTICATION,UserGroupInformation.AuthenticationMethod.KERBEROS.name());
    sessionConf.put(Constants.Explore.SUBMITLOCALTASKVIACHILD,Boolean.FALSE.toString());
    sessionConf.put(Constants.Explore.SUBMITVIACHILD,Boolean.FALSE.toString());
    if (ExploreServiceUtils.isTezEngine(hiveConf,additionalSessionConf)) {
      sessionConf.put("String_Node_Str",credentialsFilePath);
    }
  }
  if (additionalSessionConf != null) {
    sessionConf.putAll(additionalSessionConf);
  }
  return sessionConf;
}