<commit_before><?php
	class DistributionGraphTool {

		private $__user = false;
		private $__json = array();
		private $__eventModel = false;

		public function construct($eventModel, $servers, $user, $extended_view=0) {
			$this->__eventModel = $eventModel;
			$this->__serverList = $servers;
			$this->__organisationModel = $eventModel->Orgc;
			$this->__user = $user;
			$this->__json = array();
			$this->__extended_view = $extended_view;

			// construct distribution info
			$this->__json['distributionInfo'] = array();
			$sgs = $this->__eventModel->SharingGroup->fetchAllAuthorised($this->__user, 'name',  1);
			$this->__json['allSharingGroup'] = h(array_values($sgs));
			$distributionLevels = $this->__eventModel->distributionLevels;
			if (empty($sgs)) unset($distributionLevels[4]);
			foreach ($distributionLevels as $key => $value) {
				$this->__json['distributionInfo'][$key] = array('key' => h($value), 'desc' => h($this->__eventModel->distributionDescriptions[$key]['formdesc']), 'value' => h($key));<commit_msg>fix: [DistributionGraph] include metadata for all distribution level<commit_after><?php
	class DistributionGraphTool {

		private $__user = false;
		private $__json = array();
		private $__eventModel = false;

		public function construct($eventModel, $servers, $user, $extended_view=0) {
			$this->__eventModel = $eventModel;
			$this->__serverList = $servers;
			$this->__organisationModel = $eventModel->Orgc;
			$this->__user = $user;
			$this->__json = array();
			$this->__extended_view = $extended_view;

			// construct distribution info
			$this->__json['distributionInfo'] = array();
			$sgs = $this->__eventModel->SharingGroup->fetchAllAuthorised($this->__user, 'name',  1);
			$this->__json['allSharingGroup'] = h(array_values($sgs));
			$distributionLevels = $this->__eventModel->distributionLevels;
			foreach ($distributionLevels as $key => $value) {
				$this->__json['distributionInfo'][$key] = array('key' => h($value), 'desc' => h($this->__eventModel->distributionDescriptions[$key]['formdesc']), 'value' => h($key));
{'fraction_non_alphanumeric': 0.1781219748305905, 'fraction_numerical': 0.002420135527589545, 'mean_word_length': 5.625, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 47, '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': '7645268', 'n_tokens_mistral': 742, 'n_tokens_neox': 651, 'n_words': 119}