Program: 124729
Project: 124729
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 (useMaprTicket) {
      setMaprTicketConfig(serviceProperties,classLoader,useKrb);
    }
    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});
      }
    }
 else     if (userName != null && group != null) {
      ReflectionUtils.invokeMethod(conf,"String_Node_Str",new Object[]{"String_Node_Str",userName + "String_Node_Str" + group});
    }
    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});
    }
    if (useMaprTicket) {
      setMaprTicketConfig(serviceProperties,classLoader,useKrb);
    }
    if (useKrb) {
      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});
      }
    }
 else     if (userName != null && group != null) {
      ReflectionUtils.invokeMethod(conf,"String_Node_Str",new Object[]{"String_Node_Str",userName + "String_Node_Str" + group});
    }
    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;
}