<commit_before>const fs = require('fs');
const _ = require('lodash');
const decomment = require('decomment');
const path = require('path');
const appRoot = require('app-root-path');
const prependFile = require('prepend-file');



var minty = {};

//reads file into string
minty.read = function read(file, callback) {
  fs.readFile(path.join(__dirname, file), 'utf8', (err, results) => {
    callback(null, results, file);
  });
};



//split file lines into array and removes blank lines and any comments
minty.splitFile = function splitFile(results, file, callback) {
  results = decomment(results, {
    space: true
  });
  results = decomment(results);
  results = results.split('\n');
  callback(null, results, file);
};

//adds variable check function inbetween each line
minty.injectCheckCode = function injectCheckCode(results, file, callback) {
  "use strict";
  //keep track of variables as they are declared
  let variables = [];
  let activeParams = [];
  let bracketMonitor = [];
  let lineNumber = 0;
  //final code with injection will happen in this line of code;
  const injectedCodeLines = [];
  results.forEach(line => {<commit_msg>fixed decomment<commit_after>const fs = require('fs');
const _ = require('lodash');
const decomment = require('decomment');
const path = require('path');
const appRoot = require('app-root-path');
const prependFile = require('prepend-file');



var minty = {};

//reads file into string
minty.read = function read(file, callback) {
  fs.readFile(path.join(__dirname, file), 'utf8', (err, results) => {
    callback(null, results, file);
  });
};



//split file lines into array and removes blank lines and any comments
minty.splitFile = function splitFile(results, file, callback) {
  results = decomment(results, {
    space: true
  });
  const EOL = decomment.getEOL(results);
  results = results.split(EOL);
  callback(null, results, file);
};

//adds variable check function inbetween each line
minty.injectCheckCode = function injectCheckCode(results, file, callback) {
  "use strict";
  //keep track of variables as they are declared
  let variables = [];
  let activeParams = [];
  let bracketMonitor = [];
  let lineNumber = 0;
  //final code with injection will happen in this line of code;
  const injectedCodeLines = [];
  results.forEach(line => {
{'fraction_non_alphanumeric': 0.134315424610052, 'fraction_numerical': 0.0017331022530329288, 'mean_word_length': 4.407494145199063, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, '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': '5233200', 'n_tokens_mistral': 692, 'n_tokens_neox': 666, 'n_words': 218}