Program: 124731
Project: 124731
Buggy source:
private Object getConfiguration(IMetadataConnection metadataConnection) throws Exception {
  Object config=ReflectionUtils.invokeStaticMethod("String_Node_Str",classLoader,"String_Node_Str",new Object[0]);
  ReflectionUtils.invokeMethod(config,"String_Node_Str",new Object[]{"String_Node_Str",metadataConnection.getServerName()});
  ReflectionUtils.invokeMethod(config,"String_Node_Str",new Object[]{"String_Node_Str",metadataConnection.getPort()});
  ReflectionUtils.invokeMethod(config,"String_Node_Str",new Object[]{"String_Node_Str","String_Node_Str"});
  boolean useKerberos=Boolean.valueOf((String)metadataConnection.getParameter(ConnParameterKeys.CONN_PARA_KEY_USE_KRB));
  boolean useMaprTicket=Boolean.valueOf((String)metadataConnection.getParameter(ConnParameterKeys.CONN_PARA_KEY_HBASE_AUTHENTICATION_USE_MAPRTICKET));
  if (useMaprTicket) {
    setMaprTicketConfig(config,metadataConnection,classLoader,useKerberos);
  }
  if (useKerberos) {
    ReflectionUtils.invokeMethod(config,"String_Node_Str",new Object[]{"String_Node_Str","String_Node_Str"});
    ReflectionUtils.invokeMethod(config,"String_Node_Str",new Object[]{"String_Node_Str","String_Node_Str"});
    String masterPrincipal=(String)metadataConnection.getParameter(ConnParameterKeys.CONN_PARA_KEY_HBASE_AUTHENTICATION_MASTERPRINCIPAL);
    ReflectionUtils.invokeMethod(config,"String_Node_Str",new Object[]{"String_Node_Str",ConnectionContextHelper.getParamValueOffContext(metadataConnection,masterPrincipal)});
    String regionServerPrincipal=(String)metadataConnection.getParameter(ConnParameterKeys.CONN_PARA_KEY_HBASE_AUTHENTICATION_REGIONSERVERPRINCIPAL);
    ReflectionUtils.invokeMethod(config,"String_Node_Str",new Object[]{"String_Node_Str",ConnectionContextHelper.getParamValueOffContext(metadataConnection,regionServerPrincipal)});
    boolean useKeytab=Boolean.valueOf((String)metadataConnection.getParameter(ConnParameterKeys.CONN_PARA_KEY_USEKEYTAB));
    if (useKeytab) {
      String keytabPrincipal=(String)metadataConnection.getParameter(ConnParameterKeys.CONN_PARA_KEY_KEYTAB_PRINCIPAL);
      String keytabPath=(String)metadataConnection.getParameter(ConnParameterKeys.CONN_PARA_KEY_KEYTAB);
      ReflectionUtils.invokeStaticMethod("String_Node_Str",classLoader,"String_Node_Str",new String[]{ConnectionContextHelper.getParamValueOffContext(metadataConnection,keytabPrincipal),ConnectionContextHelper.getParamValueOffContext(metadataConnection,keytabPath)});
    }
  }
  updateHadoopProperties(config,metadataConnection);
  return config;
}

Fixed version (ground truth):
private Object getConfiguration(IMetadataConnection metadataConnection) throws Exception {
  Object config=ReflectionUtils.invokeStaticMethod("String_Node_Str",classLoader,"String_Node_Str",new Object[0]);
  ReflectionUtils.invokeMethod(config,"String_Node_Str",new Object[]{"String_Node_Str",metadataConnection.getServerName()});
  ReflectionUtils.invokeMethod(config,"String_Node_Str",new Object[]{"String_Node_Str",metadataConnection.getPort()});
  ReflectionUtils.invokeMethod(config,"String_Node_Str",new Object[]{"String_Node_Str","String_Node_Str"});
  boolean useKerberos=Boolean.valueOf((String)metadataConnection.getParameter(ConnParameterKeys.CONN_PARA_KEY_USE_KRB));
  boolean useMaprTicket=Boolean.valueOf((String)metadataConnection.getParameter(ConnParameterKeys.CONN_PARA_KEY_HBASE_AUTHENTICATION_USE_MAPRTICKET));
  if (useKerberos) {
    ReflectionUtils.invokeMethod(config,"String_Node_Str",new Object[]{"String_Node_Str","String_Node_Str"});
    ReflectionUtils.invokeMethod(config,"String_Node_Str",new Object[]{"String_Node_Str","String_Node_Str"});
    String masterPrincipal=(String)metadataConnection.getParameter(ConnParameterKeys.CONN_PARA_KEY_HBASE_AUTHENTICATION_MASTERPRINCIPAL);
    ReflectionUtils.invokeMethod(config,"String_Node_Str",new Object[]{"String_Node_Str",ConnectionContextHelper.getParamValueOffContext(metadataConnection,masterPrincipal)});
    String regionServerPrincipal=(String)metadataConnection.getParameter(ConnParameterKeys.CONN_PARA_KEY_HBASE_AUTHENTICATION_REGIONSERVERPRINCIPAL);
    ReflectionUtils.invokeMethod(config,"String_Node_Str",new Object[]{"String_Node_Str",ConnectionContextHelper.getParamValueOffContext(metadataConnection,regionServerPrincipal)});
    boolean useKeytab=Boolean.valueOf((String)metadataConnection.getParameter(ConnParameterKeys.CONN_PARA_KEY_USEKEYTAB));
    if (useKeytab) {
      String keytabPrincipal=(String)metadataConnection.getParameter(ConnParameterKeys.CONN_PARA_KEY_KEYTAB_PRINCIPAL);
      String keytabPath=(String)metadataConnection.getParameter(ConnParameterKeys.CONN_PARA_KEY_KEYTAB);
      ReflectionUtils.invokeStaticMethod("String_Node_Str",classLoader,"String_Node_Str",new String[]{ConnectionContextHelper.getParamValueOffContext(metadataConnection,keytabPrincipal),ConnectionContextHelper.getParamValueOffContext(metadataConnection,keytabPath)});
    }
    if (useMaprTicket) {
      setMaprTicketConfig(config,metadataConnection,classLoader,true);
    }
  }
 else   if (useMaprTicket) {
    setMaprTicketConfig(config,metadataConnection,classLoader,false);
  }
  updateHadoopProperties(config,metadataConnection);
  return config;
}