<commit_before>'use strict'; // indicate that code is executed in strict mode

var classBrowser = angular.module('classBrowserApp', ['ngAnimate', 'ngRoute', 'utilities'])

	.config(function($routeProvider) {
		$routeProvider
			.when('/', {templateUrl: 'views/start.html'})
			.when('/browse', { templateUrl: 'views/browseData.html' })
			.when('/datatypes', { templateUrl: 'views/datatypes.html' })
			.when('/about', { templateUrl: 'views/about.html' })
			.when('/view', { templateUrl: 'views/view.html' })
			.otherwise({redirectTo: '/'});
	})

	.factory('Arguments', function($http, $route, jsonData){
		var args = {}; 
		var status ={
			entityType: "classes",
			from: 0,
			to:jsonData.TABLE_SIZE,
			classesFilter: {
				label: "",
				instances: [0, 4000000],
				subclasses: [0, 200000]
			},
			propertiesFilter: {
				label: "",
				statements: [0, 20000000],
				qualifiers: [0, 100000],
				references: [0, 100000]
			}
		}
		return {
			refreshArgs: function(){
				args = {
					from: ($route.current.params.from) ? parseInt(($route.current.params.from)) : status.from,
					to: ($route.current.params.to) ? parseInt(($route.current.params.to)) : status.to,
					type: ($route.current.params.type) ? ($route.current.params.type) : status.entityType
				}
				status.from = args.from;
				status.to = args.to;
				status.entityType = args.type;
			},
			getArgs: function(){
				return args;
			},
			getStatus: function(){
				return status;
			}
		}
	})

	.factory('Properties', function($http, $route){
		var promise;
		var properties;
    
		var getData = function(id, key, defaultValue) {
			try {
				var result = properties[id][key];
				if (typeof result !== 'undefined' && result !== null) {
					return result;
				}
			} catch(e){
				return defaultValue;
			}
		}

		var getLabel = function(id) { return getData(id, 'l', null); }
		var getLabelOrId = function(id) { return getData(id, 'l', 'P' + id); }<commit_msg>fix display of unlabelled related props<commit_after>'use strict'; // indicate that code is executed in strict mode

var classBrowser = angular.module('classBrowserApp', ['ngAnimate', 'ngRoute', 'utilities'])

	.config(function($routeProvider) {
		$routeProvider
			.when('/', {templateUrl: 'views/start.html'})
			.when('/browse', { templateUrl: 'views/browseData.html' })
			.when('/datatypes', { templateUrl: 'views/datatypes.html' })
			.when('/about', { templateUrl: 'views/about.html' })
			.when('/view', { templateUrl: 'views/view.html' })
			.otherwise({redirectTo: '/'});
	})

	.factory('Arguments', function($http, $route, jsonData){
		var args = {}; 
		var status ={
			entityType: "classes",
			from: 0,
			to:jsonData.TABLE_SIZE,
			classesFilter: {
				label: "",
				instances: [0, 4000000],
				subclasses: [0, 200000]
			},
			propertiesFilter: {
				label: "",
				statements: [0, 20000000],
				qualifiers: [0, 100000],
				references: [0, 100000]
			}
		}
		return {
			refreshArgs: function(){
				args = {
					from: ($route.current.params.from) ? parseInt(($route.current.params.from)) : status.from,
					to: ($route.current.params.to) ? parseInt(($route.current.params.to)) : status.to,
					type: ($route.current.params.type) ? ($route.current.params.type) : status.entityType
				}
				status.from = args.from;
				status.to = args.to;
				status.entityType = args.type;
			},
			getArgs: function(){
				return args;
			},
			getStatus: function(){
				return status;
			}
		}
	})

	.factory('Properties', function($http, $route){
		var promise;
		var properties;
    
		var getData = function(id, key, defaultValue) {
			try {
				var result = properties[id][key];
				if (typeof result !== 'undefined' && result !== null) {
					return result;
				}
			} catch(e){
				// fall through
			}
			return defaultValue;
		}

		var getLabel = function(id) { return getData(id, 'l', null); }
		var getLabelOrId = function(id) { return getData(id, 'l', 'P' + id); }
{'fraction_non_alphanumeric': 0.17714431152965132, 'fraction_numerical': 0.019852379740391956, 'mean_word_length': 3.2903930131004366, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 2, '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': '4460382', 'n_tokens_mistral': 1635, 'n_tokens_neox': 1307, 'n_words': 283}