<commit_before>'use strict';
const FileSystem = require('fs');
const Request = require('https').request;
const Unzip = require('unzip2').Extract;
let DATABASE_PATH_FOLDER = __dirname +'/ultimate4';
let DATABASE_PATH_ZIP = DATABASE_PATH_FOLDER + '.zip';
let DATABASE_NAME = 'database.json';
const REQUEST_OPTIONS = {};
const UA_OR_JSON = /user-agent|\.json/g;
let ONLY_LOAD = [];

function updateDatabase() {
    Request( REQUEST_OPTIONS, saveZipToFile ).once('error', reportError ).end();
    require('child_process').exec( 'rm -r ' + DATABASE_PATH_FOLDER );
    FileSystem.unlink( DATABASE_PATH_ZIP );
    reportLog('Updating database');
}
function saveZipToFile( readableStream ) {
    readableStream<commit_msg>testing to make sure userAgent parser returns consistent responses<commit_after>'use strict';
const FileSystem = require('fs');
const Request = require('https').request;
const Unzip = require('unzip2').Extract;
let DATABASE_PATH_FOLDER = __dirname +'/ultimate4';
let DATABASE_PATH_ZIP = DATABASE_PATH_FOLDER + '.zip';
let DATABASE_NAME = 'database.json';
const REQUEST_OPTIONS = {};
const UA_OR_JSON = /user-agent|\.json/g;
let ONLY_LOAD = [];

function updateDatabase() {
    Request( REQUEST_OPTIONS, saveZipToFile ).once('error', reportError ).end();
    require('child_process').exec( 'rm -r ' + DATABASE_PATH_FOLDER );
    FileSystem.unlink( DATABASE_PATH_ZIP, function() {});
    reportLog('Updating database');
}
function saveZipToFile( readableStream ) {
    readableStream
{'fraction_non_alphanumeric': 0.13712374581939799, 'fraction_numerical': 0.0026755852842809363, 'mean_word_length': 5.862385321100917, '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': '3334611', 'n_tokens_mistral': 512, 'n_tokens_neox': 485, 'n_words': 106}