<commit_before>/**
 * @license
 * Copyright 2017 The FOAM Authors. All Rights Reserved.
 * http://www.apache.org/licenses/LICENSE-2.0
 */
var path_ = require('path');
var fs_ = require('fs');

process.on('unhandledRejection', function(e) {
  console.error("ERROR: Unhandled promise rejection ", e);
  process.exit(1);
});

// enable FOAM java support.
global.FOAM_FLAGS = { 'java': true, 'debug': true, 'js': false, 'swift': true };

// Enable FOAMLink mode but only if FOAMLINK_DATA is set in environment
var foamlinkMode = process.env.hasOwnProperty('FOAMLINK_DATA');
if ( foamlinkMode ) {
  global.FOAMLINK_DATA = process.env['FOAMLINK_DATA'];
}

var logger = {};
logger.debug = (...args) => {};

// Store debug files but only if DEBUG_DATA_DIR is set in environment
var debugDataDir = null;
if ( process.env.hasOwnProperty('DEBUG_DATA_DIR') ) {
  debugDataDir = process.env['DEBUG_DATA_DIR'];
  logger.debug = (...args) => {
    fs_.appendFileSync(path_.join(debugDataDir, 'debugLog.jrl'),
      args.join('p({"type": "debug", "value": ' + JSON.stringify(args) + '})\n')
    );
  };
}

require('../src/foam.js');
require('../src/foam/nanos/nanos.js');
require('../src/foam/support/support.js');

var srcPath = __dirname + "/../src/";

if ( ! (
  process.argv.length == 4 ||
  process.argv.length == 5 ||
  process.argv.length == 6 ) ) {<commit_msg>Remove excess symbol<commit_after>/**
 * @license
 * Copyright 2017 The FOAM Authors. All Rights Reserved.
 * http://www.apache.org/licenses/LICENSE-2.0
 */
var path_ = require('path');
var fs_ = require('fs');

process.on('unhandledRejection', function(e) {
  console.error("ERROR: Unhandled promise rejection ", e);
  process.exit(1);
});

// enable FOAM java support.
global.FOAM_FLAGS = { 'java': true, 'debug': true, 'js': false, 'swift': true };

// Enable FOAMLink mode but only if FOAMLINK_DATA is set in environment
var foamlinkMode = process.env.hasOwnProperty('FOAMLINK_DATA');
if ( foamlinkMode ) {
  global.FOAMLINK_DATA = process.env['FOAMLINK_DATA'];
}

var logger = {};
logger.debug = () => {};

// Store debug files but only if DEBUG_DATA_DIR is set in environment
var debugDataDir = null;
if ( process.env.hasOwnProperty('DEBUG_DATA_DIR') ) {
  debugDataDir = process.env['DEBUG_DATA_DIR'];
  logger.debug = (...args) => {
    fs_.appendFileSync(path_.join(debugDataDir, 'debugLog.jrl'),
      args.join('p({"type": "debug", "value": ' + JSON.stringify(args) + '})\n')
    );
  };
}

require('../src/foam.js');
require('../src/foam/nanos/nanos.js');
require('../src/foam/support/support.js');

var srcPath = __dirname + "/../src/";

if ( ! (
  process.argv.length == 4 ||
  process.argv.length == 5 ||
  process.argv.length == 6 ) ) {
{'fraction_non_alphanumeric': 0.1882396449704142, 'fraction_numerical': 0.0073964497041420114, 'mean_word_length': 3.9907749077490773, 'pattern_counts': {'":': 4, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '6028766', 'n_tokens_mistral': 936, 'n_tokens_neox': 921, 'n_words': 203}