Program: 15551
Project: 15551
Buggy source:
private void searchRedistPackagesOnDisk(){
  jButtonReloadRedistList.setEnabled(false);
  memorizeUncheckedItemsToConf();
  jPanelList.setBorder(BorderFactory.createTitledBorder(tblRedistLabelDefault));
  String sSteamDir=jTextFieldSteamDir.getText();
  if (!listModel.isEmpty() || !StringHelper.strIsEmpty(sSteamDir)) {
    if (!StringHelper.strIsEmpty(sSteamDir) && !sSteamDir.endsWith("String_Node_Str") && !sSteamDir.endsWith(File.separator)) {
      sSteamDir+=File.separatorChar;
    }
    fSteamDir=new File(sSteamDir);
    boolean steamExists=fSteamDir.isDirectory() && fSteamDir.exists();
    if (!listModel.isEmpty() || steamExists) {
      enableAllUI(false);
      jButtonReloadRedistList.setText(btnReloadLabelWorking);
      final JFrame thisframe=this;
      Thread tJob=new Thread(new Runnable(){
        @Override public void run(){
          try {
            jButtonStopSearch.setVisible(true);
            String nameFile=translation.getString(Translation.SEC_WMAIN,"String_Node_Str");
            String nameFileUpCase=translation.getString(Translation.SEC_WMAIN,"String_Node_Str");
            String nameFiles=translation.getString(Translation.SEC_WMAIN,"String_Node_Str");
            String nameFolder=translation.getString(Translation.SEC_WMAIN,"String_Node_Str");
            String nameFolderUpCase=translation.getString(Translation.SEC_WMAIN,"String_Node_Str");
            String nameFolders=translation.getString(Translation.SEC_WMAIN,"String_Node_Str");
            model=new RedistTableModel(translation);
            setTableModelUI();
            List<File> srcFolders=new ArrayList<>(32);
            if (fSteamDir.exists()) {
              srcFolders.add(fSteamDir);
            }
            File[] customFolders=customFoldersListStrToFiles();
            for (            File customFolder : customFolders) {
              if (!srcFolders.contains(customFolder)) {
                srcFolders.add(customFolder);
              }
            }
            List<File> allFiles=new ArrayList<>(1024);
            FileUtils.listDir(thisframe,allFiles,srcFolders,config.getMaDepth(),dangerousFolders);
            List<Redist> checkedFiles=new ArrayList<>(128);
            List<Redist> checkedFolders=new ArrayList<>(128);
            FileComparator tc=new FileComparator(allFiles,patternsCfg.getRedistFilePatternsAndDesc(patternsCfg.getEnableExperimentalPatterns()),checkedFiles,true);
            try {
              Log.info("String_Node_Str");
              tc.start();
            }
 catch (            InterruptedException ex) {
              Log.error(ex);
            }
            tc=new FileComparator(allFiles,patternsCfg.getRedistFolderPatternsAndDesc(patternsCfg.getEnableExperimentalPatterns()),checkedFolders,false);
            try {
              Log.info("String_Node_Str");
              tc.start();
            }
 catch (            InterruptedException ex) {
              Log.error(ex);
            }
            uncheckedRedistPathList=uncheckedItems.getUncheckedItems();
            for (            Redist redist : checkedFiles) {
              boolean checked=!uncheckedRedistPathList.contains(redist.getFile().getAbsolutePath());
              model.addRow(new Object[]{checked,redist.getFile().getAbsolutePath(),redist.getSize(),"String_Node_Str" + nameFileUpCase + "String_Node_Str"+ redist.getDescription()});
            }
            for (            Redist redist : checkedFolders) {
              boolean check=!uncheckedRedistPathList.contains(redist.getFile().getAbsolutePath() + File.separatorChar);
              model.addRow(new Object[]{check,redist.getFile().getAbsolutePath() + File.separatorChar,redist.getSize(),"String_Node_Str" + nameFolderUpCase + "String_Node_Str"+ redist.getDescription()});
            }
            int nbFiles=checkedFiles.size();
            int nbFolders=checkedFolders.size();
            jPanelList.setBorder(BorderFactory.createTitledBorder(tblRedistLabelDefault + "String_Node_Str" + nbFiles+ "String_Node_Str"+ (nbFiles > 1 ? nameFiles : nameFile)+ "String_Node_Str"+ checkedFolders.size()+ "String_Node_Str"+ (nbFolders > 1 ? nameFolders : nameFolder)));
          }
 catch (          InfinitiveLoopException|IOException ex) {
            Log.error(ex);
          }
 finally {
            jButtonStopSearch.setVisible(false);
            jButtonReloadRedistList.setText(btnReloadLabelInitial);
            enableAllUI(true);
            boolean rdistFound=model.getRowCount() > 0;
            jButtonRemoveRedistItemsFromDisk.setEnabled(rdistFound);
          }
        }
      }
);
      tJob.start();
    }
 else {
      jButtonRemoveRedistItemsFromDisk.setEnabled(false);
    }
  }
 else {
    jButtonRemoveRedistItemsFromDisk.setEnabled(false);
  }
}

Fixed version (ground truth):
private void searchRedistPackagesOnDisk(final JButton buttonReload){
  buttonReload.setEnabled(false);
  memorizeUncheckedItemsToConf();
  jPanelList.setBorder(BorderFactory.createTitledBorder(tblRedistLabelDefault));
  String sSteamDir=jTextFieldSteamDir.getText();
  if (!listModel.isEmpty() || !StringHelper.strIsEmpty(sSteamDir)) {
    if (!StringHelper.strIsEmpty(sSteamDir) && !sSteamDir.endsWith("String_Node_Str") && !sSteamDir.endsWith(File.separator)) {
      sSteamDir+=File.separatorChar;
    }
    fSteamDir=new File(sSteamDir);
    boolean steamExists=fSteamDir.isDirectory() && fSteamDir.exists();
    if (!listModel.isEmpty() || steamExists) {
      enableAllUI(false);
      buttonReload.setText(btnReloadLabelWorking);
      final JFrame thisframe=this;
      Thread tJob=new Thread(new Runnable(){
        @Override public void run(){
          try {
            jButtonStopSearch.setVisible(true);
            String nameFile=translation.getString(Translation.SEC_WMAIN,"String_Node_Str");
            String nameFileUpCase=translation.getString(Translation.SEC_WMAIN,"String_Node_Str");
            String nameFiles=translation.getString(Translation.SEC_WMAIN,"String_Node_Str");
            String nameFolder=translation.getString(Translation.SEC_WMAIN,"String_Node_Str");
            String nameFolderUpCase=translation.getString(Translation.SEC_WMAIN,"String_Node_Str");
            String nameFolders=translation.getString(Translation.SEC_WMAIN,"String_Node_Str");
            model=new RedistTableModel(translation);
            setTableModelUI();
            List<File> srcFolders=new ArrayList<>(32);
            if (fSteamDir.exists()) {
              srcFolders.add(fSteamDir);
            }
            File[] customFolders=customFoldersListStrToFiles();
            for (            File customFolder : customFolders) {
              if (!srcFolders.contains(customFolder)) {
                srcFolders.add(customFolder);
              }
            }
            List<File> allFiles=new ArrayList<>(1024);
            FileUtils.listDir(thisframe,allFiles,srcFolders,config.getMaDepth(),dangerousFolders);
            List<Redist> checkedFiles=new ArrayList<>(128);
            List<Redist> checkedFolders=new ArrayList<>(128);
            FileComparator tc=new FileComparator(allFiles,patternsCfg.getRedistFilePatternsAndDesc(patternsCfg.getEnableExperimentalPatterns()),checkedFiles,true);
            try {
              Log.info("String_Node_Str");
              tc.start();
            }
 catch (            InterruptedException ex) {
              Log.error(ex);
            }
            tc=new FileComparator(allFiles,patternsCfg.getRedistFolderPatternsAndDesc(patternsCfg.getEnableExperimentalPatterns()),checkedFolders,false);
            try {
              Log.info("String_Node_Str");
              tc.start();
            }
 catch (            InterruptedException ex) {
              Log.error(ex);
            }
            uncheckedRedistPathList=uncheckedItems.getUncheckedItems();
            for (            Redist redist : checkedFiles) {
              boolean checked=!uncheckedRedistPathList.contains(redist.getFile().getAbsolutePath());
              model.addRow(new Object[]{checked,redist.getFile().getAbsolutePath(),redist.getSize(),"String_Node_Str" + nameFileUpCase + "String_Node_Str"+ redist.getDescription()});
            }
            for (            Redist redist : checkedFolders) {
              boolean check=!uncheckedRedistPathList.contains(redist.getFile().getAbsolutePath() + File.separatorChar);
              model.addRow(new Object[]{check,redist.getFile().getAbsolutePath() + File.separatorChar,redist.getSize(),"String_Node_Str" + nameFolderUpCase + "String_Node_Str"+ redist.getDescription()});
            }
            int nbFiles=checkedFiles.size();
            int nbFolders=checkedFolders.size();
            jPanelList.setBorder(BorderFactory.createTitledBorder(tblRedistLabelDefault + "String_Node_Str" + nbFiles+ "String_Node_Str"+ (nbFiles > 1 ? nameFiles : nameFile)+ "String_Node_Str"+ checkedFolders.size()+ "String_Node_Str"+ (nbFolders > 1 ? nameFolders : nameFolder)));
          }
 catch (          InfinitiveLoopException|IOException ex) {
            Log.error(ex);
          }
 finally {
            jButtonStopSearch.setVisible(false);
            buttonReload.setText(btnReloadLabelInitial);
            enableAllUI(true);
            boolean rdistFound=model.getRowCount() > 0;
            jButtonRemoveRedistItemsFromDisk.setEnabled(rdistFound);
            buttonReload.setEnabled(true);
          }
        }
      }
);
      tJob.start();
    }
 else {
      jButtonRemoveRedistItemsFromDisk.setEnabled(false);
    }
  }
 else {
    jButtonRemoveRedistItemsFromDisk.setEnabled(false);
  }
}