Program: 165542
Project: 165542
Buggy source:
protected void updateAllFieldsOfSite1Movie(boolean forceUpdatePoster){
  if (movieToWriteToDiskList == null || movieToWriteToDiskList.size() == 0) {
    clearAllFieldsOfSite1Movie();
  }
 else   if (movieToWriteToDiskList != null && movieToWriteToDiskList.get(0) != null) {
    clearAllFieldsOfSite1Movie();
    if (movieToWriteToDiskList != null)     comboBoxMovieTitleText.addItem(movieToWriteToDiskList.get(0).getTitle().getTitle());
    if (currentlySelectedMovieDMM != null)     comboBoxMovieTitleText.addItem(currentlySelectedMovieDMM.getTitle().getTitle());
    if (currentlySelectedMovieJavLibrary != null)     comboBoxMovieTitleText.addItem(currentlySelectedMovieJavLibrary.getTitle().getTitle());
    if (currentlySelectedMovieSquarePlus != null)     comboBoxMovieTitleText.addItem(currentlySelectedMovieSquarePlus.getTitle().getTitle());
    if (currentlySelectedMovieActionJav != null)     comboBoxMovieTitleText.addItem(currentlySelectedMovieActionJav.getTitle().getTitle());
    if (currentlySelectedMovieJavZoo != null)     comboBoxMovieTitleText.addItem(currentlySelectedMovieJavZoo.getTitle().getTitle());
    if (comboBoxMovieTitleText.getItemCount() > 0)     comboBoxMovieTitleText.setEditable(true);
    lblOriginalTitleTextSite1.setText(movieToWriteToDiskList.get(0).getOriginalTitle().getOriginalTitle());
    if (movieToWriteToDiskList.get(0).getId() != null)     lblIDCurrentMovie.setText(movieToWriteToDiskList.get(0).getId().getId());
    if (movieToWriteToDiskList.get(0).getStudio() != null)     txtFieldStudio.setText(movieToWriteToDiskList.get(0).getStudio().getStudio());
    if (movieToWriteToDiskList.get(0).getYear() != null)     lblScrapedYearText.setText(movieToWriteToDiskList.get(0).getYear().getYear());
    if (movieToWriteToDiskList.get(0).getPlot() != null)     moviePlotTextField.setText(movieToWriteToDiskList.get(0).getPlot().getPlot());
    if (movieToWriteToDiskList.get(0).getSet() != null)     txtFieldMovieSet.setText(movieToWriteToDiskList.get(0).getSet().getSet());
    listModelGenresSite1.removeAllElements();
    for (    Genre genre : movieToWriteToDiskList.get(0).getGenres()) {
      listModelGenresSite1.addElement(genre.getGenre());
    }
    listModelActorsSite1.removeAllElements();
    for (    Actor actor : movieToWriteToDiskList.get(0).getActors()) {
      listModelActorsSite1.addElement(actor.getName());
    }
    boolean posterFileUpdateOccured=false;
    boolean fanartFileUpdateOccured=false;
    if (!forceUpdatePoster) {
      File potentialOtherPosterJpg=new File(Movie.getFileNameOfPoster(currentlySelectedMovieFileList.get(0),true));
      File potentialOtherFanartJpg=new File(Movie.getFileNameOfFanart(currentlySelectedMovieFileList.get(0),true));
      File standardPosterJpg=new File(Movie.getFileNameOfPoster(currentlySelectedMovieFileList.get(0),false));
      File standardFanartJpg=new File(Movie.getFileNameOfFanart(currentlySelectedMovieFileList.get(0),false));
      if (currentlySelectedPosterFileList.get(0).exists()) {
        try {
          ImageIcon newPosterIcon;
          BufferedImage img=ImageIO.read(currentlySelectedPosterFileList.get(0));
          BufferedImage scaledImage=Scalr.resize(img,Method.QUALITY,posterSizeX,posterSizeY,Scalr.OP_ANTIALIAS);
          newPosterIcon=new ImageIcon(scaledImage);
          lblPosterIcon.setIcon(newPosterIcon);
          posterFileUpdateOccured=true;
        }
 catch (        IOException e) {
          e.printStackTrace();
        }
      }
      if (currentlySelectedFanartFileList.get(0).exists()) {
        try {
          ImageIcon newFanartIcon;
          BufferedImage img=ImageIO.read(currentlySelectedFanartFileList.get(0));
          BufferedImage scaledImage=Scalr.resize(img,Method.QUALITY,fanartSizeX,fanartSizeY,Scalr.OP_ANTIALIAS);
          newFanartIcon=new ImageIcon(scaledImage);
          lblFanartIcon.setIcon(newFanartIcon);
          fanartFileUpdateOccured=true;
        }
 catch (        IOException e) {
          e.printStackTrace();
        }
      }
      if (currentlySelectedMovieFileList.get(0).isDirectory() && potentialOtherPosterJpg.exists() && !posterFileUpdateOccured) {
        try {
          ImageIcon newPosterIcon;
          BufferedImage img=ImageIO.read(potentialOtherPosterJpg);
          BufferedImage scaledImage=Scalr.resize(img,Method.QUALITY,posterSizeX,posterSizeY,Scalr.OP_ANTIALIAS);
          newPosterIcon=new ImageIcon(scaledImage);
          lblPosterIcon.setIcon(newPosterIcon);
          posterFileUpdateOccured=true;
        }
 catch (        IOException e) {
          e.printStackTrace();
        }
      }
      if (currentlySelectedMovieFileList.get(0).isDirectory() && potentialOtherFanartJpg.exists() && !fanartFileUpdateOccured) {
        try {
          ImageIcon newFanartIcon;
          BufferedImage img=ImageIO.read(potentialOtherFanartJpg);
          BufferedImage scaledImage=Scalr.resize(img,Method.QUALITY,posterSizeX,posterSizeY,Scalr.OP_ANTIALIAS);
          newFanartIcon=new ImageIcon(scaledImage);
          lblFanartIcon.setIcon(newFanartIcon);
          fanartFileUpdateOccured=true;
        }
 catch (        IOException e) {
          e.printStackTrace();
        }
      }
      if (standardPosterJpg.exists() && !posterFileUpdateOccured) {
        try {
          lblPosterIcon.setIcon(new ImageIcon(standardPosterJpg.getCanonicalPath()));
          posterFileUpdateOccured=true;
        }
 catch (        IOException e) {
          e.printStackTrace();
        }
      }
      if (standardFanartJpg.exists() && !fanartFileUpdateOccured) {
        try {
          lblFanartIcon.setIcon(new ImageIcon(standardFanartJpg.getCanonicalPath()));
          fanartFileUpdateOccured=true;
        }
 catch (        IOException e) {
          e.printStackTrace();
        }
      }
    }
    if (movieToWriteToDiskList.get(0).hasPoster() && !posterFileUpdateOccured) {
      try {
        posterImage=movieToWriteToDiskList.get(0).getPosters()[0].getThumbImage();
        ImageIcon newPosterIcon=new ImageIcon(posterImage);
        BufferedImage img=(BufferedImage)newPosterIcon.getImage();
        BufferedImage scaledImage=Scalr.resize(img,Method.QUALITY,posterSizeX,posterSizeY,Scalr.OP_ANTIALIAS);
        posterImage=scaledImage;
        posterFileUpdateOccured=true;
      }
 catch (      IOException e) {
        e.printStackTrace();
        JOptionPane.showMessageDialog(null,ExceptionUtils.getStackTrace(e),"String_Node_Str",JOptionPane.ERROR_MESSAGE);
      }
      lblPosterIcon.setIcon(new ImageIcon(posterImage));
    }
    if (movieToWriteToDiskList.get(0).hasFanart() && !fanartFileUpdateOccured) {
      System.out.println("String_Node_Str");
      try {
        fanartImage=movieToWriteToDiskList.get(0).getFanart()[0].getThumbImage();
        ImageIcon newFanartIcon=new ImageIcon(fanartImage);
        BufferedImage img=(BufferedImage)newFanartIcon.getImage();
        BufferedImage scaledImage=Scalr.resize(img,Method.QUALITY,fanartSizeX,fanartSizeY,Scalr.OP_ANTIALIAS);
        fanartImage=scaledImage;
      }
 catch (      IOException e) {
        e.printStackTrace();
        JOptionPane.showMessageDialog(null,ExceptionUtils.getStackTrace(e),"String_Node_Str",JOptionPane.ERROR_MESSAGE);
      }
      lblFanartIcon.setIcon(new ImageIcon(fanartImage));
    }
  }
}

Fixed version (ground truth):
protected void updateAllFieldsOfSite1Movie(boolean forceUpdatePoster){
  if (movieToWriteToDiskList == null || movieToWriteToDiskList.size() == 0) {
    clearAllFieldsOfSite1Movie();
  }
 else   if (movieToWriteToDiskList != null && movieToWriteToDiskList.get(0) != null) {
    clearAllFieldsOfSite1Movie();
    if (movieToWriteToDiskList != null)     comboBoxMovieTitleText.addItem(movieToWriteToDiskList.get(0).getTitle().getTitle());
    if (currentlySelectedMovieDMM != null)     comboBoxMovieTitleText.addItem(currentlySelectedMovieDMM.getTitle().getTitle());
    if (currentlySelectedMovieJavLibrary != null)     comboBoxMovieTitleText.addItem(currentlySelectedMovieJavLibrary.getTitle().getTitle());
    if (currentlySelectedMovieSquarePlus != null)     comboBoxMovieTitleText.addItem(currentlySelectedMovieSquarePlus.getTitle().getTitle());
    if (currentlySelectedMovieActionJav != null)     comboBoxMovieTitleText.addItem(currentlySelectedMovieActionJav.getTitle().getTitle());
    if (currentlySelectedMovieJavZoo != null)     comboBoxMovieTitleText.addItem(currentlySelectedMovieJavZoo.getTitle().getTitle());
    if (comboBoxMovieTitleText.getItemCount() > 0)     comboBoxMovieTitleText.setEditable(true);
    lblOriginalTitleTextSite1.setText(movieToWriteToDiskList.get(0).getOriginalTitle().getOriginalTitle());
    if (movieToWriteToDiskList.get(0).getId() != null)     lblIDCurrentMovie.setText(movieToWriteToDiskList.get(0).getId().getId());
    if (movieToWriteToDiskList.get(0).getStudio() != null)     txtFieldStudio.setText(movieToWriteToDiskList.get(0).getStudio().getStudio());
    if (movieToWriteToDiskList.get(0).getYear() != null)     lblScrapedYearText.setText(movieToWriteToDiskList.get(0).getYear().getYear());
    if (movieToWriteToDiskList.get(0).getPlot() != null)     moviePlotTextField.setText(movieToWriteToDiskList.get(0).getPlot().getPlot());
    if (movieToWriteToDiskList.get(0).getSet() != null)     txtFieldMovieSet.setText(movieToWriteToDiskList.get(0).getSet().getSet());
    listModelGenresSite1.removeAllElements();
    for (    Genre genre : movieToWriteToDiskList.get(0).getGenres()) {
      listModelGenresSite1.addElement(genre.getGenre());
    }
    listModelActorsSite1.removeAllElements();
    for (    Actor actor : movieToWriteToDiskList.get(0).getActors()) {
      listModelActorsSite1.addElement(actor.getName());
    }
    boolean posterFileUpdateOccured=false;
    boolean fanartFileUpdateOccured=false;
    if (!forceUpdatePoster) {
      File potentialOtherPosterJpg=new File(Movie.getFileNameOfPoster(currentlySelectedMovieFileList.get(0),true));
      File potentialOtherFanartJpg=new File(Movie.getFileNameOfFanart(currentlySelectedMovieFileList.get(0),true));
      File standardPosterJpg=new File(Movie.getFileNameOfPoster(currentlySelectedMovieFileList.get(0),false));
      File standardFanartJpg=new File(Movie.getFileNameOfFanart(currentlySelectedMovieFileList.get(0),false));
      if (currentlySelectedPosterFileList.get(0).exists()) {
        try {
          ImageIcon newPosterIcon;
          BufferedImage img=ImageIO.read(currentlySelectedPosterFileList.get(0));
          BufferedImage scaledImage=Scalr.resize(img,Method.QUALITY,posterSizeX,posterSizeY,Scalr.OP_ANTIALIAS);
          newPosterIcon=new ImageIcon(scaledImage);
          lblPosterIcon.setIcon(newPosterIcon);
          posterFileUpdateOccured=true;
        }
 catch (        IOException e) {
          e.printStackTrace();
        }
      }
      if (currentlySelectedFanartFileList.get(0).exists()) {
        try {
          ImageIcon newFanartIcon;
          BufferedImage img=ImageIO.read(currentlySelectedFanartFileList.get(0));
          BufferedImage scaledImage=Scalr.resize(img,Method.QUALITY,fanartSizeX,fanartSizeY,Scalr.OP_ANTIALIAS);
          newFanartIcon=new ImageIcon(scaledImage);
          lblFanartIcon.setIcon(newFanartIcon);
          fanartFileUpdateOccured=true;
        }
 catch (        IOException e) {
          e.printStackTrace();
        }
      }
      if (currentlySelectedMovieFileList.get(0).isDirectory() && potentialOtherPosterJpg.exists() && !posterFileUpdateOccured) {
        try {
          ImageIcon newPosterIcon;
          BufferedImage img=ImageIO.read(potentialOtherPosterJpg);
          BufferedImage scaledImage=Scalr.resize(img,Method.QUALITY,posterSizeX,posterSizeY,Scalr.OP_ANTIALIAS);
          newPosterIcon=new ImageIcon(scaledImage);
          lblPosterIcon.setIcon(newPosterIcon);
          posterFileUpdateOccured=true;
        }
 catch (        IOException e) {
          e.printStackTrace();
        }
      }
      if (currentlySelectedMovieFileList.get(0).isDirectory() && potentialOtherFanartJpg.exists() && !fanartFileUpdateOccured) {
        try {
          ImageIcon newFanartIcon;
          BufferedImage img=ImageIO.read(potentialOtherFanartJpg);
          BufferedImage scaledImage=Scalr.resize(img,Method.QUALITY,fanartSizeX,fanartSizeY,Scalr.OP_ANTIALIAS);
          newFanartIcon=new ImageIcon(scaledImage);
          lblFanartIcon.setIcon(newFanartIcon);
          fanartFileUpdateOccured=true;
        }
 catch (        IOException e) {
          e.printStackTrace();
        }
      }
      if (standardPosterJpg.exists() && !posterFileUpdateOccured) {
        try {
          lblPosterIcon.setIcon(new ImageIcon(standardPosterJpg.getCanonicalPath()));
          posterFileUpdateOccured=true;
        }
 catch (        IOException e) {
          e.printStackTrace();
        }
      }
      if (standardFanartJpg.exists() && !fanartFileUpdateOccured) {
        try {
          ImageIcon newFanartIcon;
          BufferedImage img=ImageIO.read(standardFanartJpg);
          BufferedImage scaledImage=Scalr.resize(img,Method.QUALITY,fanartSizeX,fanartSizeY,Scalr.OP_ANTIALIAS);
          newFanartIcon=new ImageIcon(scaledImage);
          lblFanartIcon.setIcon(newFanartIcon);
          fanartFileUpdateOccured=true;
        }
 catch (        IOException e) {
          e.printStackTrace();
        }
      }
    }
    if (movieToWriteToDiskList.get(0).hasPoster() && !posterFileUpdateOccured) {
      try {
        posterImage=movieToWriteToDiskList.get(0).getPosters()[0].getThumbImage();
        ImageIcon newPosterIcon=new ImageIcon(posterImage);
        BufferedImage img=(BufferedImage)newPosterIcon.getImage();
        BufferedImage scaledImage=Scalr.resize(img,Method.QUALITY,posterSizeX,posterSizeY,Scalr.OP_ANTIALIAS);
        posterImage=scaledImage;
        posterFileUpdateOccured=true;
      }
 catch (      IOException e) {
        e.printStackTrace();
        JOptionPane.showMessageDialog(null,ExceptionUtils.getStackTrace(e),"String_Node_Str",JOptionPane.ERROR_MESSAGE);
      }
      lblPosterIcon.setIcon(new ImageIcon(posterImage));
    }
    if (movieToWriteToDiskList.get(0).hasFanart() && !fanartFileUpdateOccured) {
      System.out.println("String_Node_Str");
      try {
        fanartImage=movieToWriteToDiskList.get(0).getFanart()[0].getThumbImage();
        ImageIcon newFanartIcon=new ImageIcon(fanartImage);
        BufferedImage img=(BufferedImage)newFanartIcon.getImage();
        BufferedImage scaledImage=Scalr.resize(img,Method.QUALITY,fanartSizeX,fanartSizeY,Scalr.OP_ANTIALIAS);
        fanartImage=scaledImage;
      }
 catch (      IOException e) {
        e.printStackTrace();
        JOptionPane.showMessageDialog(null,ExceptionUtils.getStackTrace(e),"String_Node_Str",JOptionPane.ERROR_MESSAGE);
      }
      lblFanartIcon.setIcon(new ImageIcon(fanartImage));
    }
  }
}