Program: 124772
Project: 124772
Buggy source:
@Override protected Object check(HadoopServiceProperties serviceProperties,ClassLoader classLoader) throws Exception {
  Object fileSystem=null;
  try {
    Object conf=Class.forName("String_Node_Str",true,classLoader).newInstance();
    URI nameNodeURI=URI.create(serviceProperties.getNameNode());
    String scheme=nameNodeURI.getScheme();
    ReflectionUtils.invokeMethod(conf,"String_Node_Str",new Object[]{String.format("String_Node_Str",scheme),"String_Node_Str"});
    ReflectionUtils.invokeMethod(conf,"String_Node_Str",new Object[]{"String_Node_Str","String_Node_Str"});
    ReflectionUtils.invokeMethod(conf,"String_Node_Str",new Object[]{"String_Node_Str","String_Node_Str"});
    setHadoopProperties(conf,serviceProperties);
    String userName=StringUtils.trimToNull(serviceProperties.getUserName());
    String group=StringUtils.trimToNull(serviceProperties.getGroup());
    boolean useKrb=serviceProperties.isUseKrb();
    boolean useMaprTicket=serviceProperties.isMaprT();
    if (useKrb) {
      String nameNodePrincipal=serviceProperties.getPrincipal();
      ReflectionUtils.invokeMethod(conf,"String_Node_Str",new Object[]{"String_Node_Str",nameNodePrincipal});
      boolean useKeytab=serviceProperties.isUseKeytab();
      if (useKeytab) {
        String keytabPrincipal=serviceProperties.getKeytabPrincipal();
        String keytab=serviceProperties.getKeytab();
        ReflectionUtils.invokeStaticMethod("String_Node_Str",classLoader,"String_Node_Str",new String[]{keytabPrincipal,keytab});
      }
      if (useMaprTicket) {
        System.setProperty("String_Node_Str","String_Node_Str");
        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 mapRTicketCluster=serviceProperties.getMaprTCluster();
        Object mapRTicketDuration=serviceProperties.getMaprTDuration();
        try {
          ReflectionUtils.invokeStaticMethod("String_Node_Str",classLoader,"String_Node_Str",new Object[]{mapRTicketCluster,mapRTicketDuration});
        }
 catch (        Exception e) {
          throw new SQLException(e);
        }
      }
    }
 else     if (userName != null && group != null) {
      ReflectionUtils.invokeMethod(conf,"String_Node_Str",new Object[]{"String_Node_Str",userName + "String_Node_Str" + group});
    }
    if (useMaprTicket) {
      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();
      Object mapRTicketDuration=serviceProperties.getMaprTDuration();
      try {
        String decryptedPassword=PasswordEncryptUtil.encryptPassword(mapRTicketPassword);
        ReflectionUtils.invokeStaticMethod("String_Node_Str",classLoader,"String_Node_Str",new Object[]{false},Boolean.class);
        ReflectionUtils.invokeStaticMethod("String_Node_Str",classLoader,"String_Node_Str",new Object[]{mapRTicketCluster,mapRTicketUsername,decryptedPassword,mapRTicketDuration});
      }
 catch (      Exception e) {
        throw new SQLException(e);
      }
    }
    fileSystem=ReflectionUtils.invokeStaticMethod("String_Node_Str",classLoader,"String_Node_Str",new Object[]{nameNodeURI,conf});
    if (fileSystem != null) {
      Object pathObj=ReflectionUtils.newInstance("String_Node_Str",classLoader,new Object[]{"String_Node_Str"});
      ReflectionUtils.invokeMethod(fileSystem,"String_Node_Str",new Object[]{pathObj});
    }
  }
  finally {
    if (fileSystem != null) {
      try {
        ReflectionUtils.invokeMethod(fileSystem,"String_Node_Str",new Object[0]);
      }
 catch (      Exception e) {
        e.printStackTrace();
      }
    }
  }
  return fileSystem;
}

Fixed version (ground truth):
@Override protected Object check(HadoopServiceProperties serviceProperties,ClassLoader classLoader) throws Exception {
  Object fileSystem=null;
  try {
    Object conf=Class.forName("String_Node_Str",true,classLoader).newInstance();
    URI nameNodeURI=URI.create(serviceProperties.getNameNode());
    String scheme=nameNodeURI.getScheme();
    ReflectionUtils.invokeMethod(conf,"String_Node_Str",new Object[]{String.format("String_Node_Str",scheme),"String_Node_Str"});
    ReflectionUtils.invokeMethod(conf,"String_Node_Str",new Object[]{"String_Node_Str","String_Node_Str"});
    ReflectionUtils.invokeMethod(conf,"String_Node_Str",new Object[]{"String_Node_Str","String_Node_Str"});
    setHadoopProperties(conf,serviceProperties);
    String userName=StringUtils.trimToNull(serviceProperties.getUserName());
    String group=StringUtils.trimToNull(serviceProperties.getGroup());
    boolean useKrb=serviceProperties.isUseKrb();
    boolean useMaprTicket=serviceProperties.isMaprT();
    if (useKrb) {
      String nameNodePrincipal=serviceProperties.getPrincipal();
      ReflectionUtils.invokeMethod(conf,"String_Node_Str",new Object[]{"String_Node_Str",nameNodePrincipal});
      boolean useKeytab=serviceProperties.isUseKeytab();
      if (useKeytab) {
        String keytabPrincipal=serviceProperties.getKeytabPrincipal();
        String keytab=serviceProperties.getKeytab();
        ReflectionUtils.invokeStaticMethod("String_Node_Str",classLoader,"String_Node_Str",new String[]{keytabPrincipal,keytab});
      }
      if (useMaprTicket) {
        System.setProperty("String_Node_Str","String_Node_Str");
        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 mapRTicketCluster=serviceProperties.getMaprTCluster();
        String mapRTicketDuration=serviceProperties.getMaprTDuration();
        Long desiredTicketDurInSecs=86400L;
        if (mapRTicketDuration != null && StringUtils.isNotBlank(mapRTicketDuration)) {
          desiredTicketDurInSecs=Long.parseLong(mapRTicketDuration);
        }
        try {
          Object mapRClientConfig=ReflectionUtils.newInstance("String_Node_Str",classLoader,new Object[]{});
          ReflectionUtils.invokeMethod(mapRClientConfig,"String_Node_Str",new Object[]{mapRTicketCluster,desiredTicketDurInSecs});
        }
 catch (        Exception e) {
          throw new SQLException(e);
        }
      }
    }
 else     if (userName != null && group != null) {
      ReflectionUtils.invokeMethod(conf,"String_Node_Str",new Object[]{"String_Node_Str",userName + "String_Node_Str" + group});
    }
    if (useMaprTicket) {
      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)) {
        desiredTicketDurInSecs=Long.parseLong(mapRTicketDuration);
      }
      try {
        String decryptedPassword=PasswordEncryptUtil.encryptPassword(mapRTicketPassword);
        Object mapRClientConfig=ReflectionUtils.newInstance("String_Node_Str",classLoader,new Object[]{});
        ReflectionUtils.invokeMethod(mapRClientConfig,"String_Node_Str",new Object[]{false},boolean.class);
        ReflectionUtils.invokeMethod(mapRClientConfig,"String_Node_Str",new Object[]{mapRTicketCluster,mapRTicketUsername,decryptedPassword,desiredTicketDurInSecs});
      }
 catch (      Exception e) {
        throw new SQLException(e);
      }
    }
    fileSystem=ReflectionUtils.invokeStaticMethod("String_Node_Str",classLoader,"String_Node_Str",new Object[]{nameNodeURI,conf});
    if (fileSystem != null) {
      Object pathObj=ReflectionUtils.newInstance("String_Node_Str",classLoader,new Object[]{"String_Node_Str"});
      ReflectionUtils.invokeMethod(fileSystem,"String_Node_Str",new Object[]{pathObj});
    }
  }
  finally {
    if (fileSystem != null) {
      try {
        ReflectionUtils.invokeMethod(fileSystem,"String_Node_Str",new Object[0]);
      }
 catch (      Exception e) {
        e.printStackTrace();
      }
    }
  }
  return fileSystem;
}