Program: 124733
Project: 124733
Buggy source:
private static void setMaprTicketConfig(HadoopClusterConnection hcConnection,ClassLoader classLoader,boolean useKerberos) throws Exception {
  String mapRTicketUsername=hcConnection.getUserName();
  String mapRTicketPassword=hcConnection.getMaprTPassword();
  String mapRTicketCluster=hcConnection.getMaprTCluster();
  String mapRTicketDuration=hcConnection.getMaprTDuration();
  boolean setMapRHomeDir=hcConnection.isSetMaprTHomeDir();
  String mapRHomeDir=hcConnection.getMaprTHomeDir();
  boolean setMapRHadoopLogin=hcConnection.isSetHadoopLogin();
  String mapRHadoopLogin=hcConnection.getMaprTHadoopLogin();
  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");
  System.setProperty("String_Node_Str",setMapRHadoopLogin ? mapRHadoopLogin : "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) {
    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});
  }
}

Fixed version (ground truth):
private static void setMaprTicketConfig(HadoopClusterConnection hcConnection,ClassLoader classLoader,boolean useKerberos) throws Exception {
  String mapRTicketUsername=hcConnection.getUserName();
  String mapRTicketPassword=hcConnection.getMaprTPassword();
  String mapRTicketCluster=hcConnection.getMaprTCluster();
  String mapRTicketDuration=hcConnection.getMaprTDuration();
  boolean setMapRHomeDir=hcConnection.isSetMaprTHomeDir();
  String mapRHomeDir=hcConnection.getMaprTHomeDir();
  boolean setMapRHadoopLogin=hcConnection.isSetHadoopLogin();
  String mapRHadoopLogin=hcConnection.getMaprTHadoopLogin();
  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");
  System.setProperty("String_Node_Str",setMapRHadoopLogin ? mapRHadoopLogin : "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) {
    Object conf=Class.forName("String_Node_Str",true,classLoader).newInstance();
    String nameNodePrincipal=hcConnection.getPrincipal();
    ReflectionUtils.invokeMethod(conf,"String_Node_Str",new Object[]{"String_Node_Str",nameNodePrincipal});
    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});
  }
}