Program: 124738
Project: 124738
Buggy source:
protected void setMaprTicketConfig(HadoopServiceProperties serviceProperties,ClassLoader classLoader,boolean useKerberos) throws Exception {
  System.setProperty("String_Node_Str","String_Node_Str");
  System.setProperty("String_Node_Str","String_Node_Str");
  System.setProperty("String_Node_Str","String_Node_Str");
  String mapRTicketUsername=serviceProperties.getUserName();
  String mapRTicketPassword=serviceProperties.getMaprTPassword();
  String mapRTicketCluster=serviceProperties.getMaprTCluster();
  String mapRTicketDuration=serviceProperties.getMaprTDuration();
  Long desiredTicketDurInSecs=86400L;
  if (mapRTicketDuration != null && StringUtils.isNotBlank(mapRTicketDuration)) {
    if (mapRTicketDuration.endsWith("String_Node_Str")) {
      mapRTicketDuration=mapRTicketDuration.substring(0,mapRTicketDuration.length() - 1);
    }
    desiredTicketDurInSecs=Long.parseLong(mapRTicketDuration);
  }
  try {
    Object mapRClientConfig=ReflectionUtils.newInstance("String_Node_Str",classLoader,new Object[]{});
    if (useKerberos) {
      System.setProperty("String_Node_Str","String_Node_Str");
      ReflectionUtils.invokeMethod(mapRClientConfig,"String_Node_Str",new Object[]{mapRTicketCluster,desiredTicketDurInSecs});
    }
 else {
      ReflectionUtils.invokeMethod(mapRClientConfig,"String_Node_Str",new Object[]{false},boolean.class);
      ReflectionUtils.invokeMethod(mapRClientConfig,"String_Node_Str",new Object[]{mapRTicketCluster,mapRTicketUsername,mapRTicketPassword,desiredTicketDurInSecs});
    }
  }
 catch (  Exception e) {
    throw new SQLException(e);
  }
}

Fixed version (ground truth):
protected void setMaprTicketConfig(HadoopServiceProperties serviceProperties,ClassLoader classLoader,boolean useKerberos) throws Exception {
  String mapRTicketUsername=serviceProperties.getUserName();
  String mapRTicketPassword=serviceProperties.getMaprTPassword();
  String mapRTicketCluster=serviceProperties.getMaprTCluster();
  String mapRTicketDuration=serviceProperties.getMaprTDuration();
  boolean setMapRHomeDir=serviceProperties.isSetMaprTHomeDir();
  String mapRHomeDir=serviceProperties.getMaprTHomeDir();
  boolean setMapRHadoopLogin=serviceProperties.isSetHadoopLogin();
  String mapRHadoopLogin=serviceProperties.getMaprTHomeDir();
  System.setProperty("String_Node_Str","String_Node_Str");
  System.setProperty("String_Node_Str","String_Node_Str");
  System.setProperty("String_Node_Str",setMapRHomeDir ? mapRHomeDir : "String_Node_Str");
  Long desiredTicketDurInSecs=86400L;
  if (mapRTicketDuration != null && StringUtils.isNotBlank(mapRTicketDuration)) {
    if (mapRTicketDuration.endsWith("String_Node_Str")) {
      mapRTicketDuration=mapRTicketDuration.substring(0,mapRTicketDuration.length() - 1);
      desiredTicketDurInSecs=Long.valueOf(mapRTicketDuration) + 'L';
    }
 else     if (StringUtils.isNumeric(mapRTicketDuration)) {
      desiredTicketDurInSecs=Long.valueOf(mapRTicketDuration) + 'L';
    }
  }
  Object mapRClientConfig=ReflectionUtils.newInstance("String_Node_Str",classLoader,new Object[]{});
  if (useKerberos) {
    System.setProperty("String_Node_Str","String_Node_Str");
    ReflectionUtils.invokeMethod(mapRClientConfig,"String_Node_Str",new Object[]{mapRTicketCluster,desiredTicketDurInSecs});
  }
 else {
    if (setMapRHadoopLogin) {
      System.setProperty("String_Node_Str",mapRHadoopLogin);
    }
 else {
      ReflectionUtils.invokeMethod(mapRClientConfig,"String_Node_Str",new Object[]{false},boolean.class);
    }
    ReflectionUtils.invokeMethod(mapRClientConfig,"String_Node_Str",new Object[]{mapRTicketCluster,mapRTicketUsername,mapRTicketPassword,desiredTicketDurInSecs});
  }
}