<commit_before>'use strict';

var fs = require('fs');
var readline = require('line-input-stream');
var exec = require('child_process').exec;
var execSync = require('sync-exec');
var args = process.argv.slice(2);
var colors = require('colors');
var verbose = false;
if (args[1] === 'verbose' || args[2] === 'verbose') {
  verbose = true;
}
var Replacer = module.exports = function Replacer(file, options) {
  var module = {},
          searches = [],
          seds = [],
          countLines = 0;
  /*
   * Add string for the replace
   * 
   * @param string search
   * @param string replace
   */
  module.add = function (search, replace) {
    searches.push({search: search, replace: replace});
  };

  /*
   * Remove the string with a blank line
   * 
   * @param string search
   */
  module.rm = function (search) {
    searches.push({search: "        " + search, replace: ''});
    searches.push({search: search, replace: ''});
  };

  /*
   * The rows for sed
   * 
   * @param number startok
   * @param number _end
   */
  module.addsed = function (startok, endok) {
    seds.push({start: startok, end: endok});
  };

  /*
   * Workaround count the line of a file
   * 
   * @param string file
   */
  module.getlines = function (file) {
    if (countLines === 0) {
      var wc = execSync("wc -l < " + process.cwd() + '/' + file);
      if (wc.stderr !== undefined) {
        console.log((wc.stderr).red);
      }
      countLines = parseInt(wc.stdout) - 1;
    }
  };

  module.file = file;

  //Base replacements
  module.add(/plugin-name/g, options.pluginSlug);
  module.add(/Plugin_Name_Admin/g, options.pluginClassName + '_Admin');
  module.add(/Plugin_Name/g, options.pluginClassName);
  module.add(/Plugin Name/g, options.pluginName);
  module.add(/Plugin Name:( {7})@TODO/g, 'Plugin Name:       ' + options.pluginName);
  module.add(/Your Name <<EMAIL>>/g, options.author + ' <' + options.authorEmail + '>');
  module.add(/1\.0\.0/g, options.pluginVersion);<commit_msg>fix for comments in plugin<commit_after>'use strict';

var fs = require('fs');
var readline = require('line-input-stream');
var exec = require('child_process').exec;
var execSync = require('sync-exec');
var args = process.argv.slice(2);
var colors = require('colors');
var verbose = false;
if (args[1] === 'verbose' || args[2] === 'verbose') {
  verbose = true;
}
var Replacer = module.exports = function Replacer(file, options) {
  var module = {},
          searches = [],
          seds = [],
          countLines = 0;
  /*
   * Add string for the replace
   * 
   * @param string search
   * @param string replace
   */
  module.add = function (search, replace) {
    searches.push({search: search, replace: replace});
  };

  /*
   * Remove the string with a blank line
   * 
   * @param string search
   */
  module.rm = function (search) {
    searches.push({search: "        " + search, replace: ''});
    searches.push({search: search, replace: ''});
  };

  /*
   * The rows for sed
   * 
   * @param number startok
   * @param number _end
   */
  module.addsed = function (startok, endok) {
    seds.push({start: startok, end: endok});
  };

  /*
   * Workaround count the line of a file
   * 
   * @param string file
   */
  module.getlines = function (file) {
    if (countLines === 0) {
      var wc = execSync("wc -l < " + process.cwd() + '/' + file);
      if (wc.stderr !== undefined) {
        console.log((wc.stderr).red);
      }
      countLines = parseInt(wc.stdout) - 1;
    }
  };

  module.file = file;

  //Base replacements
  module.add(/plugin-name/g, options.pluginSlug);
  module.add(/Plugin_Name_Admin/g, options.pluginClassName + '_Admin');
  module.add(/Plugin_Name/g, options.pluginClassName);
  module.add(/Plugin Name./g, options.pluginName);
  module.add(/Plugin Name:( {7})@TODO/g, 'Plugin Name:       ' + options.pluginName);
  module.add(/Your Name <<EMAIL>>/g, options.author + ' <' + options.authorEmail + '>');
  module.add(/1\.0\.0/g, options.pluginVersion);
{'fraction_non_alphanumeric': 0.17017543859649123, 'fraction_numerical': 0.005012531328320802, 'mean_word_length': 2.830134357005758, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 9, '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': '754735', 'n_tokens_mistral': 1337, 'n_tokens_neox': 1310, 'n_words': 311}