Program: 165460
Project: 165460
Buggy source:
/** 
 * Updates the view for the current movie
 * @param forcePosterUpdate - if force a refresh of the poster from the URL by downloading the file. If false, tries toread from the local file first
 * @param newMovieWasSet - true if you are setting a new movie. clears the old one and refreshes all fields
 */
public void updateView(boolean forcePosterUpdate,boolean newMovieWasSet){
  List<Movie> movieToWriteToDiskList=guiMain.getMovieToWriteToDiskList();
  if (newMovieWasSet && movieToWriteToDiskList.size() == 0) {
    movieToWriteToDiskList.add(currentMovie);
  }
  if ((movieToWriteToDiskList == null || movieToWriteToDiskList.size() == 0) && !newMovieWasSet) {
    clearView();
  }
 else   if (movieToWriteToDiskList != null && movieToWriteToDiskList.get(0) != null) {
    if (!newMovieWasSet)     clearView();
    if (!newMovieWasSet)     this.setCurrentMovie(movieToWriteToDiskList.get(0));
    if (movieToWriteToDiskList != null) {
      this.getCurrentMovie().getAllTitles().add(getCurrentMovie().getTitle());
      String fileName=this.getCurrentMovie().getFileName();
      if (fileName != null && fileName.trim().length() > 0)       this.getCurrentMovie().getAllTitles().add(new Title(fileName));
    }
    if (this.getCurrentMovie().getAllTitles().size() > 0)     this.setTitleEditable(true);
  }
  txtFieldMovieTitleText.setText(currentMovie.getTitle().getTitle());
  txtFieldOriginalTitleText.setText(currentMovie.getOriginalTitle().getOriginalTitle());
  txtFieldOriginalTitleText.setCaretPosition(0);
  txtFieldScrapedYearText.setText(currentMovie.getYear().getYear());
  txtFieldReleaseDateText.setText(currentMovie.getReleaseDate().getReleaseDate());
  txtFieldIDCurrentMovie.setText(currentMovie.getId().getId());
  txtFieldStudio.setText(currentMovie.getStudio().getStudio());
  txtFieldStudio.setCaretPosition(0);
  txtFieldMovieSet.setText(currentMovie.getSet().getSet());
  txtFieldMovieSet.setCaretPosition(0);
  moviePlotTextField.setText(currentMovie.getPlot().getPlot());
  moviePlotTextField.setCaretPosition(0);
  genreList.setText(toGenreListFormat(currentMovie.getGenres()));
  genreList.setCaretPosition(0);
  tagList.setText(toTagListFormat(currentMovie.getTags()));
  tagList.setCaretPosition(0);
  actorList.updateUI();
  artWorkPanel.updateView(forcePosterUpdate,guiMain);
}

Fixed version (ground truth):
/** 
 * Updates the view for the current movie
 * @param forcePosterUpdate - if force a refresh of the poster from the URL by downloading the file. If false, tries toread from the local file first
 * @param newMovieWasSet - true if you are setting a new movie. clears the old one and refreshes all fields
 */
public void updateView(boolean forcePosterUpdate,boolean newMovieWasSet){
  List<Movie> movieToWriteToDiskList=guiMain.getMovieToWriteToDiskList();
  if (newMovieWasSet && movieToWriteToDiskList.size() == 0) {
    movieToWriteToDiskList.add(currentMovie);
  }
  if ((movieToWriteToDiskList == null || movieToWriteToDiskList.size() == 0) && !newMovieWasSet) {
    clearView();
  }
 else   if (movieToWriteToDiskList != null && movieToWriteToDiskList.get(0) != null) {
    if (!newMovieWasSet)     clearView();
    if (!newMovieWasSet)     this.setCurrentMovie(movieToWriteToDiskList.get(0));
    if (movieToWriteToDiskList != null) {
      this.getCurrentMovie().getAllTitles().add(getCurrentMovie().getTitle());
      String fileName=this.getCurrentMovie().getFileName();
      if (fileName != null && fileName.trim().length() > 0)       this.getCurrentMovie().getAllTitles().add(new Title(fileName));
    }
    if (this.getCurrentMovie().getAllTitles().size() > 0)     this.setTitleEditable(true);
  }
  txtFieldMovieTitleText.setText(currentMovie.getTitle().getTitle());
  txtFieldOriginalTitleText.setText(currentMovie.getOriginalTitle().getOriginalTitle());
  txtFieldOriginalTitleText.setCaretPosition(0);
  txtFieldScrapedYearText.setText(currentMovie.getYear().getYear());
  txtFieldReleaseDateText.setText(currentMovie.getReleaseDate().getReleaseDate());
  txtFieldIDCurrentMovie.setText(currentMovie.getId().getId());
  txtFieldStudio.setText(currentMovie.getStudio().getStudio());
  txtFieldStudio.setCaretPosition(0);
  txtFieldMovieSet.setText(currentMovie.getSet().getSet());
  txtFieldMovieSet.setCaretPosition(0);
  moviePlotTextField.setText(currentMovie.getPlot().getPlot());
  moviePlotTextField.setCaretPosition(0);
  genreList.setText(toGenreListFormat(currentMovie.getGenres()));
  genreList.setCaretPosition(0);
  tagList.setText(toTagListFormat(currentMovie.getTags()));
  tagList.setCaretPosition(0);
  actorList.updateUI();
  artWorkPanel.updateView(forcePosterUpdate,guiMain);
  if (txtFieldMovieTitleText.getText().length() > 0) {
    guiMain.enableFileWrite();
  }
 else {
    guiMain.disableFileWrite();
  }
}