Program: 47182
Project: 47182
Buggy source:
@Override public void discoverChildren(String str){
  if (discoverable == null) {
    discoverable=new ArrayList<>();
  }
 else {
    return;
  }
  int sm=configuration.getSortMethod(getPath());
  List<File> files=getFileList();
  if (files.size() > configuration.getATZLimit() && StringUtils.isEmpty(forcedName)) {
    TreeMap<String,ArrayList<File>> map=new TreeMap<>();
    for (    File f : files) {
      if ((!f.isFile() && !f.isDirectory()) || f.isHidden()) {
        continue;
      }
      if (f.isDirectory() && configuration.isHideEmptyFolders() && !FileUtil.isFolderRelevant(f,configuration)) {
        LOGGER.debug("String_Node_Str" + f.getName());
        continue;
      }
      String filenameToSort=FileUtil.renameForSorting(f.getName());
      char c=filenameToSort.toUpperCase().charAt(0);
      if (!(c >= 'A' && c <= 'Z')) {
        c='#';
      }
      ArrayList<File> l=map.get(String.valueOf(c));
      if (l == null) {
        l=new ArrayList<>();
      }
      l.add(f);
      map.put(String.valueOf(c),l);
    }
    for (    String letter : map.keySet()) {
      ArrayList<File> l=map.get(letter);
      UMSUtils.sort(l,sm);
      MapFile mf=new MapFile(getConf(),l);
      mf.forcedName=letter;
      addChild(mf);
    }
    return;
  }
  UMSUtils.sort(files,(sm == UMSUtils.SORT_RANDOM ? UMSUtils.SORT_LOC_NAT : sm));
  for (  File f : files) {
    if (f.isDirectory()) {
      discoverable.add(f);
    }
  }
  if (sm == UMSUtils.SORT_RANDOM) {
    UMSUtils.sort(files,sm);
  }
  for (  File f : files) {
    if (f.isFile()) {
      discoverable.add(f);
    }
  }
}

Fixed version (ground truth):
@Override public void discoverChildren(String str){
  if (discoverable == null) {
    discoverable=new ArrayList<>();
  }
 else {
    return;
  }
  int sm=configuration.getSortMethod(getPath());
  List<File> files=getFileList();
  if (files.size() > configuration.getATZLimit() && StringUtils.isEmpty(forcedName)) {
    TreeMap<String,ArrayList<File>> map=new TreeMap<>();
    for (    File f : files) {
      if ((!f.isFile() && !f.isDirectory()) || f.isHidden()) {
        continue;
      }
      if (f.isDirectory() && configuration.isHideEmptyFolders() && !FileUtil.isFolderRelevant(f,configuration)) {
        LOGGER.debug("String_Node_Str" + f.getName());
        if (emptyFoldersToRescan == null) {
          emptyFoldersToRescan=new ArrayList<>();
        }
        if (!emptyFoldersToRescan.contains(f)) {
          emptyFoldersToRescan.add(f);
        }
        continue;
      }
      String filenameToSort=FileUtil.renameForSorting(f.getName());
      char c=filenameToSort.toUpperCase().charAt(0);
      if (!(c >= 'A' && c <= 'Z')) {
        c='#';
      }
      ArrayList<File> l=map.get(String.valueOf(c));
      if (l == null) {
        l=new ArrayList<>();
      }
      l.add(f);
      map.put(String.valueOf(c),l);
    }
    for (    String letter : map.keySet()) {
      ArrayList<File> l=map.get(letter);
      UMSUtils.sort(l,sm);
      MapFile mf=new MapFile(getConf(),l);
      mf.forcedName=letter;
      addChild(mf);
    }
    return;
  }
  UMSUtils.sort(files,(sm == UMSUtils.SORT_RANDOM ? UMSUtils.SORT_LOC_NAT : sm));
  for (  File f : files) {
    if (f.isDirectory()) {
      discoverable.add(f);
    }
  }
  if (sm == UMSUtils.SORT_RANDOM) {
    UMSUtils.sort(files,sm);
  }
  for (  File f : files) {
    if (f.isFile()) {
      discoverable.add(f);
    }
  }
}