<commit_before>var app = require('app');
var fs = require('fs');
var ipc = require('ipc');
var BrowserWindow = require('browser-window');

var userCheatList = null;
var userDataFilePath = __dirname + '/../data/userData.json';

/**********************
*  Application Startup
***********************/
app.on('ready', function(){
  var iconPath = __dirname + '/../frontend/img/cs_logo1_256.png';

  var mainWindow = new BrowserWindow({
    width: 480,
    height: 600,
    frame: false,
    icon: iconPath
  });
  mainWindow.loadUrl('file://' + __dirname + '/../frontend/index.html');

  mainWindow.on('closed', function() {
    mainWindow = null;
  });

  ipc.on('close-window-msg', function(event, arg){
    mainWindow.close();
  });
  ipc.on('minimize-window-msg', function(event, arg) {
    mainWindow.minimize();
  });

});

/**********************
*  Application Quit
***********************/
app.on('window-all-closed', function() {
  app.quit();
});


/****************************
* Cheat management functions
*****************************/

ipc.on('load-cheats-msg', function(event, arg) {
  var userDataFileContents = fs.readFileSync(userDataFilePath);
  userCheatList = JSON.parse(userDataFileContents);

  event.returnValue = userCheatList;
});

ipc.on('add-cheat-msg', function (event, newCheat) {
  userCheatList.cheats.push(newCheat);
  persistToDataStoreAsync();
});

ipc.on('edit-cheat-msg', function (event, modifiedCheat) {
  cheatSearchResult = userCheatList.cheats.filter(function (cheat) {
                        return cheat.id == modifiedCheat.id;
                       });

  if (cheatSearchResult.length > 0)
  {
    cheatSearchResult[0].title = modifiedCheat.title;
    cheatSearchResult[0].notes = modifiedCheat.notes;
    cheatSearchResult[0].code = modifiedCheat.code;
    cheatSearchResult[0].tags = modifiedCheat.tags;

    persistToDataStoreAsync();
  }
});
<commit_msg>removed unnecessary arg<commit_after>var app = require('app');
var fs = require('fs');
var ipc = require('ipc');
var BrowserWindow = require('browser-window');

var userCheatList = null;
var userDataFilePath = __dirname + '/../data/userData.json';

/**********************
*  Application Startup
***********************/
app.on('ready', function(){
  var iconPath = __dirname + '/../frontend/img/cs_logo1_256.png';

  var mainWindow = new BrowserWindow({
    width: 480,
    height: 600,
    frame: false,
    icon: iconPath
  });
  mainWindow.loadUrl('file://' + __dirname + '/../frontend/index.html');

  mainWindow.on('closed', function() {
    mainWindow = null;
  });

  ipc.on('close-window-msg', function(event, arg){
    mainWindow.close();
  });
  ipc.on('minimize-window-msg', function(event, arg) {
    mainWindow.minimize();
  });

});

/**********************
*  Application Quit
***********************/
app.on('window-all-closed', function() {
  app.quit();
});


/****************************
* Cheat management functions
*****************************/

ipc.on('load-cheats-msg', function(event) {
  var userDataFileContents = fs.readFileSync(userDataFilePath);
  userCheatList = JSON.parse(userDataFileContents);

  event.returnValue = userCheatList;
});

ipc.on('add-cheat-msg', function (event, newCheat) {
  userCheatList.cheats.push(newCheat);
  persistToDataStoreAsync();
});

ipc.on('edit-cheat-msg', function (event, modifiedCheat) {
  cheatSearchResult = userCheatList.cheats.filter(function (cheat) {
                        return cheat.id == modifiedCheat.id;
                       });

  if (cheatSearchResult.length > 0)
  {
    cheatSearchResult[0].title = modifiedCheat.title;
    cheatSearchResult[0].notes = modifiedCheat.notes;
    cheatSearchResult[0].code = modifiedCheat.code;
    cheatSearchResult[0].tags = modifiedCheat.tags;

    persistToDataStoreAsync();
  }
});

{'fraction_non_alphanumeric': 0.22487536079769088, 'fraction_numerical': 0.007871949619522435, 'mean_word_length': 4.096256684491979, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '4454736', 'n_tokens_mistral': 1249, 'n_tokens_neox': 1183, 'n_words': 201}