<commit_before>(function(){
	var userIn = angular.module('userInteraction', []);
	
	// Create a directive for Scenarios Menu Entry
	userIn.directive('scenarioMenuEntry', function(){
		return {
			restrict: 'A',
			templateUrl: 'asset/templates/scenarioMenuEntry.html',
		};
	});

	// Create a Controller for the Scenario Information
	userIn.controller('ScenarioController', ['$routeParams', '$location', '$http', '$scope',
		function($routeParams, $location, $http,$scope){
			var controller = this;
			
			// initialize an empty list of scenario Ids
            this.currentScenario = {};
			this.scenarios = {};
			
			$http.get(JEngine_Server_URL + "/" + JCore_REST_Interface + "/scenario/").
				success(function(data){
					controller.scenarios = data;
					});

            this.getInstancesOfScenario = function(id) {
                $http.get(JEngine_Server_URL + "/" + JCore_REST_Interface + "/scenario/" + id + "/instance/").
                    success(function(data) {
                        controller.currentScenario['instances'] = data;
                    }).
                    error(function() {
                        console.log('request failed');
                    });
            };

            this.submitNewInstanceNameForm=function(){
                var data=$scope.form;
                $http.put(JEngine_Server_URL + "/" + JCore_REST_Interface + "/scenario/"+ $routeParams.id + "/instance/?", data);
            }

            this.getTerminationConditionOfScenario = function(id) {
                $http.get(JEngine_Server_URL + "/" + JCore_REST_Interface + "/scenario/" + id + "/terminationcondition/").
                    success(function(data) {
                        controller.currentScenario['terminationcondition'] = data;
                    }).
                    error(function() {
                        console.log('request failed');
                    });
            };

            //if we are within the layer scenario
            if ($routeParams.id != null) {
                //setting current id of scenario based on the URI
                controller.currentScenario['id'] = $routeParams.id;<commit_msg>enough for today! :)<commit_after>(function(){
	var userIn = angular.module('userInteraction', []);
	
	// Create a directive for Scenarios Menu Entry
	userIn.directive('scenarioMenuEntry', function(){
		return {
			restrict: 'A',
			templateUrl: 'asset/templates/scenarioMenuEntry.html',
		};
	});

	// Create a Controller for the Scenario Information
	userIn.controller('ScenarioController', ['$routeParams', '$location', '$http', '$scope',
		function($routeParams, $location, $http,$scope){
			var controller = this;
			
			// initialize an empty list of scenario Ids
            this.currentScenario = {};
			this.scenarios = {};
			
			$http.get(JEngine_Server_URL + "/" + JCore_REST_Interface + "/scenario/").
				success(function(data){
					controller.scenarios = data;
					});

            this.getInstancesOfScenario = function(id) {
                $http.get(JEngine_Server_URL + "/" + JCore_REST_Interface + "/scenario/" + id + "/instance/").
                    success(function(data) {
                        controller.currentScenario['instances'] = data;
                    }).
                    error(function() {
                        console.log('request failed');
                    });
            };

            this.submitNewInstanceNameForm=function(){
                var data=$scope.form;
                $http.put(JEngine_Server_URL + "/" + JCore_REST_Interface + "/scenario/"+ $routeParams.id + "/instance/?", data).
                    success(function(response) {
                        $location.path("/scenario/" + $routeParams.id + "/instance/" + response['id']);
                    }).
                    error(function() {
                        console.log('request failed');
                    });
            }

            this.getTerminationConditionOfScenario = function(id) {
                $http.get(JEngine_Server_URL + "/" + JCore_REST_Interface + "/scenario/" + id + "/terminationcondition/").
                    success(function(data) {
                        controller.currentScenario['terminationcondition'] = data;
                    }).
                    error(function() {
                        console.log('request failed');
                    });
            };

            //if we are within the layer scenario
            if ($routeParams.id != null) {
                //setting current id of scenario based on the URI
                controller.currentScenario['id'] = $routeParams.id;
{'fraction_non_alphanumeric': 0.13153347732181425, 'fraction_numerical': 0.0, 'mean_word_length': 1.8341493268053854, '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': '3865902', 'n_tokens_mistral': 1284, 'n_tokens_neox': 1145, 'n_words': 224}