<commit_before>class ContestController < ApplicationController

	def show
		@contest = Contest.find(params[:id])
		if @contest
			@referendum = @contest.ballot.referendum if @contest.ballot
			@responses = []
			if @referendum and @referendum.ballot_responses.count > 0
				@responses = @referendum.ballot_responses.collect &:text
			end
			@candidates = @contest.ballot.candidates.size > 0 ? @contest.ballot.candidates : nil
		end
	end
<commit_msg>another fix for nil ballot info<commit_after>class ContestController < ApplicationController

	def show
		@contest = Contest.find(params[:id])
		if @contest and @contest.ballot
			@referendum = @contest.ballot.referendum 
			@responses = []
			if @referendum and @referendum.ballot_responses.count > 0
				@responses = @referendum.ballot_responses.collect &:text
			end
			@candidates = @contest.ballot.candidates.size > 0 ? @contest.ballot.candidates : nil
		end
	end

{'fraction_non_alphanumeric': 0.10457516339869281, 'fraction_numerical': 0.004357298474945534, 'mean_word_length': 4.374269005847953, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4428531', 'n_tokens_mistral': 363, 'n_tokens_neox': 312, 'n_words': 65}