Program: 56439
Project: 56439
Buggy source:
private void updateEpisodeViews(final Cursor cursor){
  if (cursor.moveToFirst()) {
    loaded=true;
    final int episodeNumber=Cursors.getInt(cursor,EpisodeColumns.EPISODE);
    season=cursor.getInt(cursor.getColumnIndex(EpisodeColumns.SEASON));
    episodeTitle=cursor.getString(cursor.getColumnIndex(EpisodeColumns.TITLE));
    if (TextUtils.isEmpty(episodeTitle)) {
      if (season == 0) {
        episodeTitle=getResources().getString(R.string.special_x,episodeNumber);
      }
 else {
        episodeTitle=getResources().getString(R.string.episode_x,episodeNumber);
      }
    }
    title.setText(episodeTitle);
    overview.setText(cursor.getString(cursor.getColumnIndex(EpisodeColumns.OVERVIEW)));
    final String screenshot=cursor.getString(cursor.getColumnIndex(EpisodeColumns.SCREENSHOT));
    setBackdrop(screenshot,true);
    firstAired.setText(DateUtils.millisToString(getActivity(),cursor.getLong(cursor.getColumnIndex(EpisodeColumns.FIRST_AIRED)),true));
    watched=cursor.getInt(cursor.getColumnIndex(EpisodeColumns.WATCHED)) == 1;
    collected=cursor.getInt(cursor.getColumnIndex(EpisodeColumns.IN_COLLECTION)) == 1;
    inWatchlist=cursor.getInt(cursor.getColumnIndex(EpisodeColumns.IN_WATCHLIST)) == 1;
    watching=cursor.getInt(cursor.getColumnIndex(EpisodeColumns.WATCHING)) == 1;
    checkedIn=cursor.getInt(cursor.getColumnIndex(EpisodeColumns.CHECKED_IN)) == 1;
    watchedView.setVisibility(watched ? View.VISIBLE : View.GONE);
    inCollectionView.setVisibility(collected ? View.VISIBLE : View.GONE);
    inWatchlistView.setVisibility(inWatchlist ? View.VISIBLE : View.GONE);
    currentRating=cursor.getInt(cursor.getColumnIndex(EpisodeColumns.USER_RATING));
    final float ratingAll=cursor.getFloat(cursor.getColumnIndex(EpisodeColumns.RATING));
    rating.setValue(ratingAll);
    createMenu(toolbar);
  }
}

Fixed version (ground truth):
private void updateEpisodeViews(final Cursor cursor){
  if (cursor.moveToFirst()) {
    loaded=true;
    final int episodeNumber=Cursors.getInt(cursor,EpisodeColumns.EPISODE);
    season=cursor.getInt(cursor.getColumnIndex(EpisodeColumns.SEASON));
    episodeTitle=cursor.getString(cursor.getColumnIndex(EpisodeColumns.TITLE));
    if (TextUtils.isEmpty(episodeTitle)) {
      if (season == 0) {
        episodeTitle=getResources().getString(R.string.special_x,episodeNumber);
      }
 else {
        episodeTitle=getResources().getString(R.string.episode_x,episodeNumber);
      }
    }
    title.setText(episodeTitle);
    overview.setText(cursor.getString(cursor.getColumnIndex(EpisodeColumns.OVERVIEW)));
    final String screenshot=cursor.getString(cursor.getColumnIndex(EpisodeColumns.SCREENSHOT));
    setBackdrop(screenshot,true);
    firstAired.setText(DateUtils.millisToString(getActivity(),cursor.getLong(cursor.getColumnIndex(EpisodeColumns.FIRST_AIRED)),true));
    watched=cursor.getInt(cursor.getColumnIndex(EpisodeColumns.WATCHED)) == 1;
    collected=cursor.getInt(cursor.getColumnIndex(EpisodeColumns.IN_COLLECTION)) == 1;
    inWatchlist=cursor.getInt(cursor.getColumnIndex(EpisodeColumns.IN_WATCHLIST)) == 1;
    watching=cursor.getInt(cursor.getColumnIndex(EpisodeColumns.WATCHING)) == 1;
    checkedIn=cursor.getInt(cursor.getColumnIndex(EpisodeColumns.CHECKED_IN)) == 1;
    watchedView.setVisibility(watched ? View.VISIBLE : View.GONE);
    inCollectionView.setVisibility(collected ? View.VISIBLE : View.GONE);
    inWatchlistView.setVisibility(inWatchlist ? View.VISIBLE : View.GONE);
    currentRating=cursor.getInt(cursor.getColumnIndex(EpisodeColumns.USER_RATING));
    final float ratingAll=cursor.getFloat(cursor.getColumnIndex(EpisodeColumns.RATING));
    rating.setValue(ratingAll);
    invalidateMenu();
  }
}