<commit_before>angular.module('app.controllers')

.controller('payCtrl', function($scope, DishesService, SharesService, BillService, OptionsService, BillService) {
	//mockPeople();
	var $expenseData = DishesService.all();
	//var $expenseData = mockExpense();
	var $people = SharesService.all();
	var $bill = BillService.getBill();
	var $totalValue = 0;
	var $totalDetail = [];
	
	$scope.people = getSummaryData();
	$scope.totalValue = $totalValue; 
	$scope.totalDetail = $totalDetail;
	$scope.bill = $bill;
	
	$scope.view = function($event, team) {
		viewDetail($event, team);
	}
	
	function getSummaryData() {
		var people = createPeople();
		var index = 0;
		var result = [];
		calculateBill(people);
		for(i in people) {
			$totalValue += people[i].getPrice();
			result.push(people[i].getSummary());
			index++;
		}
		return result;
	}
	
	function createPeople() {
		var people = {};
		for( index in  $people) {
			people[$people[index].name] = new plopleBill($people[index].name);
		}
		return people;
	}
	
	function calculateBill(people) {
		var currentList;<commit_msg>update payCtrlController<commit_after>angular.module('app.controllers')

.controller('payCtrl', function($scope, DishesService, SharesService, BillService, OptionsService, BillService) {
	//mockPeople();
	var $expenseData = DishesService.all();
	//var $expenseData = mockExpense();
	var $people = SharesService.all();
	var $bill = BillService.getBill();
	var $totalValue = 0;
	var $totalDetail = [];
	
	$scope.people = getSummaryData();
	$scope.totalValue = $totalValue; 
	$scope.totalDetail = $totalDetail;
	$scope.bill = $bill;
	
	$scope.view = function($event, team) {
		viewDetail($event, team);
	}
	
	function getSummaryData() {
		var people = createPeople();
		var index = 0;
		var result = [];
		calculateBill(people);
		for(i in people) {
			$totalValue += people[i].getPrice();
			result.push(people[i].getSummary());
			index++;
		}
		return result;
	}
	
	function createPeople() {
		var people = {};
		var name;
		for( index in  $people) {
			name= $people[index].name
			people[name] = new plopleBill(name);
		}
		return people;
	}
	
	function calculateBill(people) {
		var currentList;
{'fraction_non_alphanumeric': 0.15639374425023, 'fraction_numerical': 0.0018399264029438822, 'mean_word_length': 4.41044776119403, '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': '3818677', 'n_tokens_mistral': 790, 'n_tokens_neox': 711, 'n_words': 156}