Program: 165527
Project: 165527
Buggy source:
@Override public void actionPerformed(ActionEvent arg0){
  String pathSeperator=System.getProperty("String_Node_Str");
  int moviesToMove=guiMain.getCurrentlySelectedMovieFileList().size();
  for (int movieNumberInList=0; movieNumberInList < moviesToMove; movieNumberInList++) {
    try {
      this.guiMain.getFrmMoviescraper().setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
      if (this.guiMain.getCurrentlySelectedMovieFileList() != null && this.guiMain.getCurrentlySelectedMovieFileList().get(movieNumberInList).exists() && this.guiMain.getCurrentlySelectedMovieFileList().get(movieNumberInList).isFile()) {
        String destinationDirectoryPrefix="String_Node_Str";
        if (this.guiMain.movieToWriteToDiskList != null && this.guiMain.movieToWriteToDiskList.size() > 0) {
          String possibleID=this.guiMain.movieToWriteToDiskList.get(movieNumberInList).getId().getId().toUpperCase();
          String possibleIDWithoutDash=possibleID.replaceFirst("String_Node_Str","String_Node_Str");
          String fileNameComparingTo=FilenameUtils.getBaseName(this.guiMain.getCurrentlySelectedMovieFileList().get(movieNumberInList).getName().toUpperCase());
          if (possibleID.endsWith(SiteParsingProfile.stripDiscNumber(fileNameComparingTo)) || possibleIDWithoutDash.endsWith(SiteParsingProfile.stripDiscNumber(fileNameComparingTo))) {
            destinationDirectoryPrefix=this.guiMain.movieToWriteToDiskList.get(movieNumberInList).getTitle().getTitle() + "String_Node_Str";
            destinationDirectoryPrefix=destinationDirectoryPrefix.replace("String_Node_Str","String_Node_Str").replaceAll("String_Node_Str","String_Node_Str");
          }
        }
        File destDir=new File(this.guiMain.getCurrentlySelectedMovieFileList().get(movieNumberInList).getParentFile().getCanonicalPath() + pathSeperator + destinationDirectoryPrefix+ SiteParsingProfile.stripDiscNumber(FilenameUtils.getBaseName(this.guiMain.getCurrentlySelectedMovieFileList().get(movieNumberInList).getName())));
        this.guiMain.clearAllFieldsOfFileDetailPanel();
        if (this.guiMain.getCurrentlySelectedMovieFileList().get(movieNumberInList).isFile() && this.guiMain.getCurrentlySelectedActorsFolderList() != null && this.guiMain.getPreferences().getDownloadActorImagesToActorFolderPreference()) {
          File[] actorFilesToCopy=this.guiMain.actorFolderFiles(movieNumberInList);
          File actorsFolderDestDir=new File(destDir.getPath() + File.separator + "String_Node_Str");
          for (          File currentFile : actorFilesToCopy) {
            FileUtils.copyFileToDirectory(currentFile,actorsFolderDestDir);
          }
        }
        if (this.guiMain.getCurrentlySelectedMovieFileList().get(movieNumberInList).exists()) {
          File currentDirectory=this.guiMain.getCurrentlySelectedMovieFileList().get(movieNumberInList).getParentFile();
          String currentlySelectedMovieFileWihoutStackSuffix=SiteParsingProfile.stripDiscNumber(FilenameUtils.removeExtension(this.guiMain.getCurrentlySelectedMovieFileList().get(movieNumberInList).getName()));
          if (currentDirectory != null) {
            for (            File currentFile : currentDirectory.listFiles()) {
              String currentFileNameWithoutStackSuffix=SiteParsingProfile.stripDiscNumber(FilenameUtils.removeExtension(currentFile.getName()));
              if (currentFile.isFile() && currentFileNameWithoutStackSuffix.equals(currentlySelectedMovieFileWihoutStackSuffix)) {
                FileUtils.moveFileToDirectory(currentFile,destDir,true);
              }
            }
          }
        }
        if (this.guiMain.getCurrentlySelectedNfoFileList().get(movieNumberInList).exists())         FileUtils.moveFileToDirectory(this.guiMain.getCurrentlySelectedNfoFileList().get(movieNumberInList),destDir,true);
        if (this.guiMain.getCurrentlySelectedPosterFileList().get(movieNumberInList).exists()) {
          if (this.guiMain.getPreferences().getCreateFolderJpgEnabledPreference()) {
            File currentlySelectedFolderJpg=new File(Movie.getFileNameOfFolderJpg(destDir));
            FileUtils.copyFile(this.guiMain.getCurrentlySelectedPosterFileList().get(movieNumberInList),currentlySelectedFolderJpg);
          }
          FileUtils.moveFileToDirectory(this.guiMain.getCurrentlySelectedPosterFileList().get(movieNumberInList),destDir,true);
        }
        if (this.guiMain.getCurrentlySelectedFanartFileList().get(movieNumberInList).exists()) {
          FileUtils.moveFileToDirectory(this.guiMain.getCurrentlySelectedFanartFileList().get(movieNumberInList),destDir,true);
        }
        if (this.guiMain.getCurrentlySelectedTrailerFileList().get(movieNumberInList).exists()) {
          FileUtils.moveFileToDirectory(this.guiMain.getCurrentlySelectedTrailerFileList().get(movieNumberInList),destDir,true);
        }
        if (this.guiMain.getPreferences().getExtraFanartScrapingEnabledPreference()) {
          this.guiMain.movieToWriteToDiskList.get(movieNumberInList).writeExtraFanart(destDir);
        }
      }
    }
 catch (    IOException e) {
      e.printStackTrace();
      JOptionPane.showMessageDialog(null,ExceptionUtils.getStackTrace(e),"String_Node_Str",JOptionPane.ERROR_MESSAGE);
    }
 finally {
      this.guiMain.getFrmMoviescraper().setCursor(Cursor.getDefaultCursor());
    }
  }
  guiMain.removeOldScrapedMovieReferences();
  guiMain.removeOldSelectedFileReferences();
  this.guiMain.updateFileListModel(this.guiMain.getCurrentlySelectedDirectoryList(),false);
}

Fixed version (ground truth):
@Override public void actionPerformed(ActionEvent arg0){
  String pathSeperator=System.getProperty("String_Node_Str");
  int moviesToMove=guiMain.getCurrentlySelectedMovieFileList().size();
  for (int movieNumberInList=0; movieNumberInList < moviesToMove; movieNumberInList++) {
    try {
      this.guiMain.getFrmMoviescraper().setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
      if (this.guiMain.getCurrentlySelectedMovieFileList() != null && this.guiMain.getCurrentlySelectedMovieFileList().get(movieNumberInList).exists() && this.guiMain.getCurrentlySelectedMovieFileList().get(movieNumberInList).isFile()) {
        String destinationDirectoryPrefix="String_Node_Str";
        if (this.guiMain.movieToWriteToDiskList != null && this.guiMain.movieToWriteToDiskList.size() > 0) {
          String possibleID=this.guiMain.movieToWriteToDiskList.get(movieNumberInList).getId().getId().toUpperCase();
          String possibleIDWithoutDash=possibleID.replaceFirst("String_Node_Str","String_Node_Str");
          String fileNameComparingTo=FilenameUtils.getBaseName(this.guiMain.getCurrentlySelectedMovieFileList().get(movieNumberInList).getName().toUpperCase());
          if (possibleID.endsWith(SiteParsingProfile.stripDiscNumber(fileNameComparingTo)) || possibleIDWithoutDash.endsWith(SiteParsingProfile.stripDiscNumber(fileNameComparingTo))) {
            destinationDirectoryPrefix=this.guiMain.movieToWriteToDiskList.get(movieNumberInList).getTitle().getTitle() + "String_Node_Str";
            destinationDirectoryPrefix=destinationDirectoryPrefix.replace("String_Node_Str","String_Node_Str").replaceAll("String_Node_Str","String_Node_Str");
          }
        }
        File destDir=new File(this.guiMain.getCurrentlySelectedMovieFileList().get(movieNumberInList).getParentFile().getCanonicalPath() + pathSeperator + destinationDirectoryPrefix+ SiteParsingProfile.stripDiscNumber(FilenameUtils.getBaseName(this.guiMain.getCurrentlySelectedMovieFileList().get(movieNumberInList).getName())));
        this.guiMain.clearAllFieldsOfFileDetailPanel();
        if (this.guiMain.getCurrentlySelectedMovieFileList().get(movieNumberInList).isFile() && this.guiMain.getCurrentlySelectedActorsFolderList() != null && this.guiMain.getPreferences().getDownloadActorImagesToActorFolderPreference()) {
          File[] actorFilesToCopy=this.guiMain.actorFolderFiles(movieNumberInList);
          File actorsFolderDestDir=new File(destDir.getPath() + File.separator + "String_Node_Str");
          for (          File currentFile : actorFilesToCopy) {
            FileUtils.copyFileToDirectory(currentFile,actorsFolderDestDir);
          }
        }
        if (this.guiMain.getCurrentlySelectedMovieFileList().get(movieNumberInList).exists()) {
          File currentDirectory=this.guiMain.getCurrentlySelectedMovieFileList().get(movieNumberInList).getParentFile();
          String currentlySelectedMovieFileWihoutStackSuffix=SiteParsingProfile.stripDiscNumber(FilenameUtils.removeExtension(this.guiMain.getCurrentlySelectedMovieFileList().get(movieNumberInList).getName()));
          if (currentDirectory != null) {
            for (            File currentFile : currentDirectory.listFiles()) {
              String currentFileNameWithoutStackSuffix=SiteParsingProfile.stripDiscNumber(FilenameUtils.removeExtension(currentFile.getName()));
              if (currentFile.isFile() && currentFileNameWithoutStackSuffix.equals(currentlySelectedMovieFileWihoutStackSuffix)) {
                FileUtils.moveFileToDirectory(currentFile,destDir,true);
              }
            }
          }
        }
        if (this.guiMain.getCurrentlySelectedNfoFileList().get(movieNumberInList).exists())         FileUtils.moveFileToDirectory(this.guiMain.getCurrentlySelectedNfoFileList().get(movieNumberInList),destDir,true);
        if (this.guiMain.getCurrentlySelectedPosterFileList().get(movieNumberInList).exists()) {
          if (this.guiMain.getPreferences().getCreateFolderJpgEnabledPreference()) {
            File currentlySelectedFolderJpg=new File(Movie.getFileNameOfFolderJpg(destDir));
            FileUtils.copyFile(this.guiMain.getCurrentlySelectedPosterFileList().get(movieNumberInList),currentlySelectedFolderJpg);
          }
          FileUtils.moveFileToDirectory(this.guiMain.getCurrentlySelectedPosterFileList().get(movieNumberInList),destDir,true);
        }
        if (this.guiMain.getCurrentlySelectedFanartFileList().get(movieNumberInList).exists()) {
          FileUtils.moveFileToDirectory(this.guiMain.getCurrentlySelectedFanartFileList().get(movieNumberInList),destDir,true);
        }
        if (this.guiMain.getCurrentlySelectedTrailerFileList().get(movieNumberInList).exists()) {
          FileUtils.moveFileToDirectory(this.guiMain.getCurrentlySelectedTrailerFileList().get(movieNumberInList),destDir,true);
        }
        if (this.guiMain.getPreferences().getExtraFanartScrapingEnabledPreference() && guiMain.movieToWriteToDiskList.size() > movieNumberInList) {
          this.guiMain.movieToWriteToDiskList.get(movieNumberInList).writeExtraFanart(destDir);
        }
      }
    }
 catch (    IOException e) {
      e.printStackTrace();
      JOptionPane.showMessageDialog(null,ExceptionUtils.getStackTrace(e),"String_Node_Str",JOptionPane.ERROR_MESSAGE);
    }
 finally {
      this.guiMain.getFrmMoviescraper().setCursor(Cursor.getDefaultCursor());
    }
  }
  guiMain.removeOldScrapedMovieReferences();
  guiMain.removeOldSelectedFileReferences();
  this.guiMain.updateFileListModel(this.guiMain.getCurrentlySelectedDirectoryList(),false);
}