<commit_before>module PlansHelper
	def owner_name(plan)
		plan_id= plan.id
		unless !Plan.exists?(plan_id)
			user_id = UserPlan.where(plan_id: plan_id, owner: true).first.user_id
			owner = User.find(user_id).full_name
			return owner
		end
	end

	def state(plan)
		plan_state_id = plan.current_plan_state_id
		unless plan_state_id.nil?
			state = PlanState.find(plan_state_id).state.capitalize
			return state
		end
	end

	def plan_name(planstate)
		plan_id = planstate.plan_id
		unless !Plan.exists?(plan_id)
			Plan.find(plan_id).name
		end
	end

	def plan_user(planstate)
		plan_id = planstate.plan_id
		unless !Plan.exists?(plan_id)
			user_id = UserPlan.where(plan_id: plan_id).first.user_id
			User.find(user_id).full_name<commit_msg>Fixing nil error related to plan owner name<commit_after>module PlansHelper
	def owner_name(plan)
		plan_id= plan.id
		unless !Plan.exists?(plan_id)
			user_id = UserPlan.where(plan_id: plan_id, owner: true).first.user_id
			unless !User.exists?(user_id)
				owner = User.find(user_id).full_name
				return owner
			end
		end
	end

	def state(plan)
		plan_state_id = plan.current_plan_state_id
		unless plan_state_id.nil?
			state = PlanState.find(plan_state_id).state.capitalize
			return state
		end
	end

	def plan_name(planstate)
		plan_id = planstate.plan_id
		unless !Plan.exists?(plan_id)
			Plan.find(plan_id).name
		end
	end

	def plan_user(planstate)
		plan_id = planstate.plan_id
		unless !Plan.exists?(plan_id)
			user_id = UserPlan.where(plan_id: plan_id).first.user_id
			User.find(user_id).full_name
{'fraction_non_alphanumeric': 0.09447300771208227, 'fraction_numerical': 0.0, 'mean_word_length': 4.36896551724138, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '5740168', 'n_tokens_mistral': 663, 'n_tokens_neox': 590, 'n_words': 109}