Program: 166475
Project: 166475
Buggy source:
public static <T>T executeUnderKerberos(String userName,String password,PrivilegedAction<T> action) throws IOException {
  final String errMsg="String_Node_Str" + "String_Node_Str" + "String_Node_Str";
class MySecureClientLoginConfiguration extends javax.security.auth.login.Configuration {
    private String userName;
    private String password;
    MySecureClientLoginConfiguration(    String aUserName,    String password){
      this.userName=aUserName;
      this.password=password;
    }
    @Override public AppConfigurationEntry[] getAppConfigurationEntry(    String appName){
      Map<String,String> kerberosOptions=new HashMap<String,String>();
      kerberosOptions.put("String_Node_Str",this.userName);
      kerberosOptions.put("String_Node_Str","String_Node_Str");
      kerberosOptions.put("String_Node_Str","String_Node_Str");
      kerberosOptions.put(KrbPasswordSaverLoginModule.USERNAME_PARAM,this.userName);
      kerberosOptions.put(KrbPasswordSaverLoginModule.PASSWORD_PARAM,this.password);
      kerberosOptions.put("String_Node_Str","String_Node_Str");
      kerberosOptions.put("String_Node_Str","String_Node_Str");
      kerberosOptions.put("String_Node_Str","String_Node_Str");
      kerberosOptions.put("String_Node_Str","String_Node_Str");
      kerberosOptions.put("String_Node_Str","String_Node_Str");
      AppConfigurationEntry KEYTAB_KERBEROS_LOGIN=null;
      AppConfigurationEntry KERBEROS_PWD_SAVER=null;
      try {
        KEYTAB_KERBEROS_LOGIN=new AppConfigurationEntry(KerberosUtil.getKrb5LoginModuleName(),AppConfigurationEntry.LoginModuleControlFlag.REQUIRED,kerberosOptions);
        KERBEROS_PWD_SAVER=new AppConfigurationEntry(KrbPasswordSaverLoginModule.class.getName(),LoginModuleControlFlag.REQUIRED,kerberosOptions);
      }
 catch (      IllegalArgumentException e) {
        String msgDesc="String_Node_Str";
        HadoopException hdpException=new HadoopException(msgDesc,e);
        LOG.error(msgDesc,e);
        hdpException.generateResponseDataMap(false,BaseClient.getMessage(e),msgDesc + errMsg,null,null);
        throw hdpException;
      }
      LOG.info("String_Node_Str" + kerberosOptions.get("String_Node_Str"));
      return new AppConfigurationEntry[]{KERBEROS_PWD_SAVER,KEYTAB_KERBEROS_LOGIN};
    }
  }
  ;
  T ret=null;
  Subject subject=null;
  LoginContext loginContext=null;
  try {
    subject=new Subject();
    LOG.info("String_Node_Str" + userName + "String_Node_Str"+ password);
    LOG.info("String_Node_Str");
    MySecureClientLoginConfiguration loginConf=new MySecureClientLoginConfiguration(userName,password);
    LOG.info("String_Node_Str");
    loginContext=new LoginContext("String_Node_Str",subject,null,loginConf);
    LOG.info("String_Node_Str");
    loginContext.login();
    Subject loginSubj=loginContext.getSubject();
    if (loginSubj != null) {
      ret=Subject.doAs(loginSubj,action);
    }
  }
 catch (  LoginException le) {
    String msgDesc="String_Node_Str" + "String_Node_Str" + userName + "String_Node_Str";
    HadoopException hdpException=new HadoopException(msgDesc,le);
    LOG.error(msgDesc,le);
    hdpException.generateResponseDataMap(false,BaseClient.getMessage(le),msgDesc + errMsg,null,null);
    throw hdpException;
  }
catch (  SecurityException se) {
    String msgDesc="String_Node_Str";
    HadoopException hdpException=new HadoopException(msgDesc,se);
    LOG.error(msgDesc,se);
    hdpException.generateResponseDataMap(false,BaseClient.getMessage(se),msgDesc + errMsg,null,null);
    throw hdpException;
  }
 finally {
    if (loginContext != null) {
      if (subject != null) {
        try {
          loginContext.logout();
        }
 catch (        LoginException e) {
          throw new IOException("String_Node_Str",e);
        }
      }
    }
  }
  return ret;
}

Fixed version (ground truth):
public static <T>T executeUnderKerberos(String userName,String password,PrivilegedAction<T> action) throws IOException {
  final String errMsg="String_Node_Str" + "String_Node_Str" + "String_Node_Str";
class MySecureClientLoginConfiguration extends javax.security.auth.login.Configuration {
    private String userName;
    private String password;
    MySecureClientLoginConfiguration(    String aUserName,    String password){
      this.userName=aUserName;
      this.password=password;
    }
    @Override public AppConfigurationEntry[] getAppConfigurationEntry(    String appName){
      Map<String,String> kerberosOptions=new HashMap<String,String>();
      kerberosOptions.put("String_Node_Str",this.userName);
      kerberosOptions.put("String_Node_Str","String_Node_Str");
      kerberosOptions.put("String_Node_Str","String_Node_Str");
      kerberosOptions.put(KrbPasswordSaverLoginModule.USERNAME_PARAM,this.userName);
      kerberosOptions.put(KrbPasswordSaverLoginModule.PASSWORD_PARAM,this.password);
      kerberosOptions.put("String_Node_Str","String_Node_Str");
      kerberosOptions.put("String_Node_Str","String_Node_Str");
      kerberosOptions.put("String_Node_Str","String_Node_Str");
      kerberosOptions.put("String_Node_Str","String_Node_Str");
      kerberosOptions.put("String_Node_Str","String_Node_Str");
      AppConfigurationEntry KEYTAB_KERBEROS_LOGIN=null;
      AppConfigurationEntry KERBEROS_PWD_SAVER=null;
      try {
        KEYTAB_KERBEROS_LOGIN=new AppConfigurationEntry(KerberosUtil.getKrb5LoginModuleName(),AppConfigurationEntry.LoginModuleControlFlag.REQUIRED,kerberosOptions);
        KERBEROS_PWD_SAVER=new AppConfigurationEntry(KrbPasswordSaverLoginModule.class.getName(),LoginModuleControlFlag.REQUIRED,kerberosOptions);
      }
 catch (      IllegalArgumentException e) {
        String msgDesc="String_Node_Str";
        HadoopException hdpException=new HadoopException(msgDesc,e);
        LOG.error(msgDesc,e);
        hdpException.generateResponseDataMap(false,BaseClient.getMessage(e),msgDesc + errMsg,null,null);
        throw hdpException;
      }
      LOG.info("String_Node_Str" + kerberosOptions.get("String_Node_Str"));
      return new AppConfigurationEntry[]{KERBEROS_PWD_SAVER,KEYTAB_KERBEROS_LOGIN};
    }
  }
  ;
  T ret=null;
  Subject subject=null;
  LoginContext loginContext=null;
  try {
    subject=new Subject();
    LOG.info("String_Node_Str" + userName + "String_Node_Str");
    LOG.info("String_Node_Str");
    MySecureClientLoginConfiguration loginConf=new MySecureClientLoginConfiguration(userName,password);
    LOG.info("String_Node_Str");
    loginContext=new LoginContext("String_Node_Str",subject,null,loginConf);
    LOG.info("String_Node_Str");
    loginContext.login();
    Subject loginSubj=loginContext.getSubject();
    if (loginSubj != null) {
      ret=Subject.doAs(loginSubj,action);
    }
  }
 catch (  LoginException le) {
    String msgDesc="String_Node_Str" + "String_Node_Str" + userName + "String_Node_Str";
    HadoopException hdpException=new HadoopException(msgDesc,le);
    LOG.error(msgDesc,le);
    hdpException.generateResponseDataMap(false,BaseClient.getMessage(le),msgDesc + errMsg,null,null);
    throw hdpException;
  }
catch (  SecurityException se) {
    String msgDesc="String_Node_Str";
    HadoopException hdpException=new HadoopException(msgDesc,se);
    LOG.error(msgDesc,se);
    hdpException.generateResponseDataMap(false,BaseClient.getMessage(se),msgDesc + errMsg,null,null);
    throw hdpException;
  }
 finally {
    if (loginContext != null) {
      if (subject != null) {
        try {
          loginContext.logout();
        }
 catch (        LoginException e) {
          throw new IOException("String_Node_Str",e);
        }
      }
    }
  }
  return ret;
}