Program: 165469
Project: 165469
Buggy source:
@Override protected Void doInBackground() throws Exception {
  for (int movieNumberInList=0; movieNumberInList < guiMain.getCurrentlySelectedMovieFileList().size(); movieNumberInList++) {
    try {
      guiMain.getFrmMoviescraper().setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
      if (guiMain.movieToWriteToDiskList == null) {
        System.err.println("String_Node_Str");
      }
      if (guiMain.movieToWriteToDiskList.get(movieNumberInList) == null) {
        System.out.println("String_Node_Str");
        continue;
      }
      System.out.println("String_Node_Str" + guiMain.movieToWriteToDiskList);
      if (guiMain.movieToWriteToDiskList != null) {
        if (guiMain.getPreferences().getRenameMovieFile()) {
          File oldMovieFile=guiMain.getCurrentlySelectedMovieFileList().get(movieNumberInList);
          Movie movie=guiMain.movieToWriteToDiskList.get(movieNumberInList);
          guiMain.getPreferences();
          String sanitizerString=MoviescraperPreferences.getSanitizerForFilename();
          guiMain.getPreferences();
          String renameString=MoviescraperPreferences.getRenamerString();
          Renamer renamer=new Renamer(renameString,sanitizerString,movie,oldMovieFile);
          String newMovieFilename=renamer.getNewFileName();
          System.out.println("String_Node_Str" + newMovieFilename);
          File newMovieFile=new File(newMovieFilename);
          boolean renameStatus=oldMovieFile.renameTo(newMovieFile);
          if (!renameStatus) {
            System.err.println("String_Node_Str" + oldMovieFile + "String_Node_Str"+ newMovieFile);
          }
          guiMain.movieToWriteToDiskList.get(movieNumberInList).writeToFile(new File(Movie.getFileNameOfNfo(newMovieFile,guiMain.getPreferences().getNfoNamedMovieDotNfo())),new File(Movie.getFileNameOfPoster(newMovieFile,guiMain.getPreferences().getNoMovieNameInImageFiles())),new File(Movie.getFileNameOfFanart(newMovieFile,guiMain.getPreferences().getNoMovieNameInImageFiles())),new File(Movie.getFileNameOfFolderJpg(newMovieFile)),new File(Movie.getFileNameOfExtraFanartFolderName(newMovieFile)),new File(Movie.getFileNameOfTrailer(newMovieFile)),guiMain.getPreferences());
        }
 else {
          guiMain.movieToWriteToDiskList.get(movieNumberInList).writeToFile(guiMain.getCurrentlySelectedNfoFileList().get(movieNumberInList),guiMain.getCurrentlySelectedPosterFileList().get(movieNumberInList),guiMain.getCurrentlySelectedFanartFileList().get(movieNumberInList),guiMain.getCurrentlySelectedFolderJpgFileList().get(movieNumberInList),new File(Movie.getFileNameOfExtraFanartFolderName(guiMain.getCurrentlySelectedMovieFileList().get(movieNumberInList))),new File(Movie.getFileNameOfTrailer(guiMain.getCurrentlySelectedMovieFileList().get(movieNumberInList))),guiMain.getPreferences());
        }
        if (guiMain.getPreferences().getExtraFanartScrapingEnabledPreference() && guiMain.getCurrentlySelectedMovieFileList().get(movieNumberInList).isDirectory()) {
          guiMain.movieToWriteToDiskList.get(movieNumberInList).writeExtraFanart(guiMain.getCurrentlySelectedMovieFileList().get(movieNumberInList));
        }
      }
      if (guiMain.getPreferences().getDownloadActorImagesToActorFolderPreference() && guiMain.getCurrentlySelectedMovieFileList() != null && guiMain.getCurrentlySelectedDirectoryList() != null) {
        guiMain.movieToWriteToDiskList.get(movieNumberInList).writeActorImagesToFolder(guiMain.getCurrentlySelectedMovieFileList().get(movieNumberInList));
      }
      System.out.println("String_Node_Str");
    }
 catch (    IOException e) {
      e.printStackTrace();
      guiMain.getFrmMoviescraper().setCursor(Cursor.getDefaultCursor());
    }
 finally {
      guiMain.getFrmMoviescraper().setCursor(Cursor.getDefaultCursor());
    }
  }
  return null;
}

Fixed version (ground truth):
@Override protected Void doInBackground() throws Exception {
  for (int movieNumberInList=0; movieNumberInList < guiMain.getCurrentlySelectedMovieFileList().size(); movieNumberInList++) {
    try {
      guiMain.getFrmMoviescraper().setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
      if (guiMain.movieToWriteToDiskList == null) {
        System.err.println("String_Node_Str");
      }
      if (guiMain.movieToWriteToDiskList.get(movieNumberInList) == null) {
        System.out.println("String_Node_Str");
        continue;
      }
      System.out.println("String_Node_Str" + guiMain.movieToWriteToDiskList);
      if (guiMain.movieToWriteToDiskList != null) {
        if (guiMain.getPreferences().getRenameMovieFile()) {
          File oldMovieFile=guiMain.getCurrentlySelectedMovieFileList().get(movieNumberInList);
          Movie movie=guiMain.movieToWriteToDiskList.get(movieNumberInList);
          String sanitizerString=MoviescraperPreferences.getSanitizerForFilename();
          String renameString=MoviescraperPreferences.getRenamerString();
          Renamer renamer=new Renamer(renameString,sanitizerString,movie,oldMovieFile);
          String newMovieFilename=renamer.getNewFileName();
          System.out.println("String_Node_Str" + newMovieFilename);
          File newMovieFile=new File(newMovieFilename);
          boolean renameStatus=oldMovieFile.renameTo(newMovieFile);
          if (!renameStatus) {
            System.err.println("String_Node_Str" + oldMovieFile + "String_Node_Str"+ newMovieFile);
          }
          guiMain.movieToWriteToDiskList.get(movieNumberInList).writeToFile(new File(Movie.getFileNameOfNfo(newMovieFile,guiMain.getPreferences().getNfoNamedMovieDotNfo())),new File(Movie.getFileNameOfPoster(newMovieFile,guiMain.getPreferences().getNoMovieNameInImageFiles())),new File(Movie.getFileNameOfFanart(newMovieFile,guiMain.getPreferences().getNoMovieNameInImageFiles())),new File(Movie.getFileNameOfFolderJpg(newMovieFile)),new File(Movie.getFileNameOfExtraFanartFolderName(newMovieFile)),new File(Movie.getFileNameOfTrailer(newMovieFile)),guiMain.getPreferences());
        }
 else {
          guiMain.movieToWriteToDiskList.get(movieNumberInList).writeToFile(guiMain.getCurrentlySelectedNfoFileList().get(movieNumberInList),guiMain.getCurrentlySelectedPosterFileList().get(movieNumberInList),guiMain.getCurrentlySelectedFanartFileList().get(movieNumberInList),guiMain.getCurrentlySelectedFolderJpgFileList().get(movieNumberInList),new File(Movie.getFileNameOfExtraFanartFolderName(guiMain.getCurrentlySelectedMovieFileList().get(movieNumberInList))),new File(Movie.getFileNameOfTrailer(guiMain.getCurrentlySelectedMovieFileList().get(movieNumberInList))),guiMain.getPreferences());
        }
        if (guiMain.getPreferences().getExtraFanartScrapingEnabledPreference() && guiMain.getCurrentlySelectedMovieFileList().get(movieNumberInList).isDirectory()) {
          guiMain.movieToWriteToDiskList.get(movieNumberInList).writeExtraFanart(guiMain.getCurrentlySelectedMovieFileList().get(movieNumberInList));
        }
      }
      if (guiMain.getPreferences().getDownloadActorImagesToActorFolderPreference() && guiMain.getCurrentlySelectedMovieFileList() != null && guiMain.getCurrentlySelectedDirectoryList() != null) {
        guiMain.movieToWriteToDiskList.get(movieNumberInList).writeActorImagesToFolder(guiMain.getCurrentlySelectedMovieFileList().get(movieNumberInList));
      }
      System.out.println("String_Node_Str");
    }
 catch (    IOException e) {
      e.printStackTrace();
      guiMain.getFrmMoviescraper().setCursor(Cursor.getDefaultCursor());
    }
 finally {
      guiMain.getFrmMoviescraper().setCursor(Cursor.getDefaultCursor());
    }
  }
  return null;
}