<commit_before>var myApp = angular.module('parkingDemo', []);
		
/* retriev data from the server */
myApp.controller('ParkinglotCtrl', function($scope, $http){
	$http.get('https://api.mongolab.com/api/1/databases/uno-parking/collections/lots/?apiKey=<KEY>')
		.success(function(data){
			$scope.lots = data[0].lots;
		})

	$scope.lotId = 0;			/* store each lot id */
	$scope.selectedLot = 0;
	$scope.myid = 0;

	/* to pass the lot id each setLot is called */
	$scope.setLot = function(newValue){
		$scope.lotId = newValue;
		$scope.selectedLot = $scope.lots[$scope.lotId];
	};

	/* to calculate the total avialable space for each lot */
	$scope.total = function(q){
		var total = 0;
		$scope.myid= q;

		$scope.myselectedLot = $scope.lots[$scope.myid];

        angular.forEach($scope.myselectedLot.lanes, function(s){
        
                total+= s.availability;
         });

        return total;
	};
});

var lotInfo =
{
	"id": 234,
	"lots" :[
	{
		"id" : 0,
		"name" : "lot 1",
		"totalSpace" : 30,
		"lane" : [
			{
				"id" : 0,
				"name" : "lane 1",
				"totalSpace" : 10,
				"status" : "full",
				"availability" : 0
			},
			{
				"id" : 1,
				"name" : "lane 2",
				"totalSpace" : 10,
				"status" : "available",
				"availability" : 5
			},
			{
				"id" : 3,
				"name" : "lane 3",
				"totalSpace" : 10,
				"status" : "available",
				"availability" : 3
			}
		]
	},
	{
		"id" : 1,
		"name" : "lot 2",
		"totalSpace" : 20,
		"lane" : [
			{
				"id" : 0,
				"name" : "lane 1",
				"totalSpace" : 10,
				"status" : "full",
				"availability" : 0
			},
			{
				"id" : 1,
				"name" : "lane 2",
				"totalSpace" : 10,
				"status" : "available",
				"availability" : 5
			}
		]
	},
	{
		"id" : 2,
		"name" : "lot 3",
		"totalSpace" : 30,
		"lane" : [
			{
				"id" : 0,
				"name" : "lane 1",
				"totalSpace" : 20,
				"status" : "full",
				"availability" : 0
			},
			{
				"id" : 1,
				"name" : "lane 2",
				"totalSpace" : 10,
				"status" : "available",
				"availability" : 5
			}
		]
	},
	{
		"id" : 3,
		"name" : "lot 4",
		"totalSpace" : 30,
		"lane" : [
			{
				"id" : 0,
				"name" : "lane 1",
				"totalSpace" : 10,
				"status" : "full",
				"availability" : 0
			},
			{
				"id" : 1,
				"name" : "lane 2",
				"totalSpace" : 10,
				"status" : "available",
				"availability" : 6
			},
			{
				"id" : 3,
				"name" : "lane 3",
				"totalSpace" : 10,
				"status" : "available",
				"availability" : 2
			}
		]
	},
	{
		"id" : 4,
		"name" : "lot 5",
		"totalSpace" : 30,
		"lane" : [
			{
				"id" : 0,
				"name" : "lane 1",
				"totalSpace" : 10,
				"status" : "full",
				"availability" : 0
			},
			{
				"id" : 1,
				"name" : "lane 2",
				"totalSpace" : 10,
				"status" : "full",
				"availability" : 0
			},
			{
				"id" : 3,
				"name" : "lane 3",
				"totalSpace" : 10,
				"status" : "available",
				"availability" : 8
			}
		]
	}]
};<commit_msg>separate json object in app.js<commit_after>var myApp = angular.module('parkingDemo', []);
		
/* retriev data from the server */
myApp.controller('ParkinglotCtrl', function($scope, $http){
	$http.get('https://api.mongolab.com/api/1/databases/uno-parking/collections/lots/?apiKey=<KEY>')
		.success(function(data){
			$scope.lots = data[0].lots;
		})

	$scope.lotId = 0;			/* store each lot id */
	$scope.selectedLot = 0;
	$scope.myid = 0;

	/* to pass the lot id each setLot is called */
	$scope.setLot = function(newValue){
		$scope.lotId = newValue;
		$scope.selectedLot = $scope.lots[$scope.lotId];
	};

	/* to calculate the total avialable space for each lot */
	$scope.total = function(q){
		var total = 0;
		$scope.myid= q;

		$scope.myselectedLot = $scope.lots[$scope.myid];

        angular.forEach($scope.myselectedLot.lanes, function(s){
        
                total+= s.availability;
         });

        return total;
	};
});
{'fraction_non_alphanumeric': 0.1993753253513795, 'fraction_numerical': 0.026028110359187923, 'mean_word_length': 2.2902397260273974, 'pattern_counts': {'":': 1, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 2, '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': '3068142', 'n_tokens_mistral': 1966, 'n_tokens_neox': 1538, 'n_words': 320}