Program: 124957
Project: 124957
Buggy source:
public void loadHDFSFolderChildren(HDFSConnectionBean connection,Object fileSystem,ClassLoader classLoader,HDFSPath parent,String path) throws HadoopServerException {
  if (connection == null || fileSystem == null || classLoader == null || parent == null || path == null) {
    return;
  }
  try {
    Object pathObj=ReflectionUtils.newInstance("String_Node_Str",classLoader,new Object[]{path});
    Object[] statusList=(Object[])ReflectionUtils.invokeMethod(fileSystem,"String_Node_Str",new Object[]{pathObj});
    if (statusList == null) {
      return;
    }
    for (    Object status : statusList) {
      if (!canAccess(connection,status)) {
        continue;
      }
      HDFSPath content=null;
      Object statusPath=ReflectionUtils.invokeMethod(status,"String_Node_Str",new Object[0]);
      String pathName=(String)ReflectionUtils.invokeMethod(statusPath,"String_Node_Str",new Object[0]);
      String absolutePath=((URI)ReflectionUtils.invokeMethod(statusPath,"String_Node_Str",new Object[0])).toString();
      String relativePath=URI.create(absolutePath).getPath();
      if ((Boolean)ReflectionUtils.invokeMethod(status,"String_Node_Str",new Object[0])) {
        content=new HDFSFolder(parent);
      }
 else {
        content=new HDFSFile(parent);
        content.setTable(createTable(trimFileExtention(pathName)));
      }
      content.setPath(relativePath);
      content.setValue(pathName);
      parent.addChild(content);
    }
  }
 catch (  Exception e) {
    throw new HadoopServerException(e);
  }
}

Fixed version (ground truth):
public void loadHDFSFolderChildren(HDFSConnectionBean connection,Object fileSystem,ClassLoader classLoader,HDFSPath parent,String path) throws HadoopServerException {
  if (connection == null || fileSystem == null || classLoader == null || parent == null || path == null) {
    return;
  }
  try {
    Object pathObj=ReflectionUtils.newInstance("String_Node_Str",classLoader,new Object[]{path});
    Object[] statusList=(Object[])ReflectionUtils.invokeMethod(fileSystem,"String_Node_Str",new Object[]{pathObj});
    if (statusList == null) {
      return;
    }
    for (    Object status : statusList) {
      if (!canAccess(connection,status)) {
        continue;
      }
      HDFSPath content=null;
      Object statusPath=ReflectionUtils.invokeMethod(status,"String_Node_Str",new Object[0]);
      if (statusPath == null) {
        continue;
      }
      String pathName=(String)ReflectionUtils.invokeMethod(statusPath,"String_Node_Str",new Object[0]);
      if (StringUtils.isBlank(pathName)) {
        continue;
      }
      String absolutePath=((URI)ReflectionUtils.invokeMethod(statusPath,"String_Node_Str",new Object[0])).toString();
      if (StringUtils.isBlank(absolutePath)) {
        continue;
      }
      String relativePath=URI.create(absolutePath).getPath();
      if ((Boolean)ReflectionUtils.invokeMethod(status,"String_Node_Str",new Object[0])) {
        content=new HDFSFolder(parent);
      }
 else {
        content=new HDFSFile(parent);
        content.setTable(createTable(trimFileExtention(pathName)));
      }
      content.setPath(relativePath);
      content.setValue(pathName);
      parent.addChild(content);
    }
  }
 catch (  Exception e) {
    throw new HadoopServerException(e);
  }
}