<commit_before>var fs = require('fs');
var ps = require('path');
var cs = require('crypto');
var rm = require('rimraf');


var IS_WINDOWS = process.platform === 'win32';
var SYS_DIR_MODE = 0700;
var SYS_FILE_MODE = 0600;
var SYS_FILE_FLAGS = 'wx+';
var TEMPLATE_RE = /X+/g;
var CHARS = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz';


var noop = function (callback) {
  callback && process.nextTick(callback);
};
var tracking = false;
var trackedDirs = {};
var trackedFiles = {};
var manuallyTrackedDirs = {};
var manuallyTrackedFiles = {};

process.addListener('exit', function (exitcode) {
  if (tracking) {
    clearSync();
  } else {
    clearManuallyTracked();
  }
});
process.addListener('uncaughtException', function (err) {
  clearSync();
});

/* History:
 * https://github.com/joyent/node/blob/a11bf99ce0dae4d8f4de8a9c0c32159c1a9ecfbf/lib/os.js#L42-L47
 * https://github.com/joyent/node/blob/120e5a24df76deb5019abec9744ace94f0f3746a/lib/os.js#L45-L56
 * https://github.com/iojs/io.js/blob/6c80e38b014b7be570ffafa91032a6d67d7dd4ae/lib/os.js#L25-L40
 *
 * Reason for my choice:
 *   Never trust the return string.
 */
function tmpdir() {
  if (IS_WINDOWS) {
    return process.env.TEMP || process.env.TMP ||
           (process.env.SystemRoot || process.env.windir) + '\\temp';
  } else {<commit_msg>Fix: Should throw the uncaught error.<commit_after>var fs = require('fs');
var ps = require('path');
var cs = require('crypto');
var rm = require('rimraf');


var IS_WINDOWS = process.platform === 'win32';
var SYS_DIR_MODE = 0700;
var SYS_FILE_MODE = 0600;
var SYS_FILE_FLAGS = 'wx+';
var TEMPLATE_RE = /X+/g;
var CHARS = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz';


var noop = function (callback) {
  callback && process.nextTick(callback);
};
var tracking = false;
var trackedDirs = {};
var trackedFiles = {};
var manuallyTrackedDirs = {};
var manuallyTrackedFiles = {};

process.addListener('exit', function (exitcode) {
  if (tracking) {
    clearSync();
  } else {
    clearManuallyTracked();
  }
});

var onUncaughtException = function (err) {
  process.removeListener('uncaughtException', onUncaughtException);
  clearSync();
  throw err;
};
process.addListener('uncaughtException', onUncaughtException);

/* History:
 * https://github.com/joyent/node/blob/a11bf99ce0dae4d8f4de8a9c0c32159c1a9ecfbf/lib/os.js#L42-L47
 * https://github.com/joyent/node/blob/120e5a24df76deb5019abec9744ace94f0f3746a/lib/os.js#L45-L56
 * https://github.com/iojs/io.js/blob/6c80e38b014b7be570ffafa91032a6d67d7dd4ae/lib/os.js#L25-L40
 *
 * Reason for my choice:
 *   Never trust the return string.
 */
function tmpdir() {
  if (IS_WINDOWS) {
    return process.env.TEMP || process.env.TMP ||
           (process.env.SystemRoot || process.env.windir) + '\\temp';
  } else {
{'fraction_non_alphanumeric': 0.14901960784313725, 'fraction_numerical': 0.0677361853832442, 'mean_word_length': 4.691683569979716, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 6, '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': '1228788', 'n_tokens_mistral': 1185, 'n_tokens_neox': 1068, 'n_words': 180}