<commit_before><?php
$headers = array('timestamp', 'timezone', 'user', 'program', 'event');
echo $this->Csv->arrayToLine($headers);
foreach ($userLogs as $userLog) {
	$data = array(
		'timestamp' => $userLog['UserLog']['timestamp'],
		'timezone' => $userLog['UserLog']['timezone'],
		'user' => $userLog['UserLog']['user-name'],
		'event' => $userLog['UserLog']['parameters']);
	if (isset($userLog['UserLog']['program-name'])) {
		$data['program-name'] = $userLog['UserLog']['program-name'];
	}
	echo $this->Csv->dictToLine($data, $headers);
}<commit_msg>fix export user log in csv missing program name<commit_after><?php
$headers = array('timestamp', 'timezone', 'user', 'program', 'event');
echo $this->Csv->arrayToLine($headers);
foreach ($userLogs as $userLog) {
	$data = array(
		'timestamp' => $userLog['UserLog']['timestamp'],
		'timezone' => $userLog['UserLog']['timezone'],
		'user' => $userLog['UserLog']['user-name'],
		'event' => $userLog['UserLog']['parameters']);
	if (isset($userLog['UserLog']['program-name'])) {
		$data['program'] = $userLog['UserLog']['program-name'];
	}
	echo $this->Csv->dictToLine($data, $headers);
}
{'fraction_non_alphanumeric': 0.2541776605101143, 'fraction_numerical': 0.0, 'mean_word_length': 7.621212121212121, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 19, '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': '6322249', 'n_tokens_mistral': 394, 'n_tokens_neox': 385, 'n_words': 68}