Program: 124702
Project: 124702
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});
    }
    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;
}

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