<commit_before>var playersService = (function(){
  
  var players = [];
  
  var addPlayer = function addPlayer(uuid){
    players[uuid] = {
      uuid : uuid,
      added : new Date()
    };
    return players[uuid];
  };
  
  var removePlayer = function removePlayer(uuid){
    delete players[uuid];
  };
  
  var getPlayer = function getPlayer(uuid){
    return players[uuid];
  };
  
  var updatePlayerLocation = function updatePlayerLocation(uuid, location){
    var player = players[uuid];
    if(!player) player = addPlayer(uuid);
    player.location = location;
    players[uuid] = player;
  };
  
  var batchUpdate = function batchUpdate(participantUUIDs){
    // Remove players that have left
    _.foreach(players, function(player){
      if(!_.contains(participantUUIDs, player.uuid)){
        removePlayer(uuid);
      }
    });    
    /// Add new players
    _.foreach(participantUUIDs, function(uuid){
      if(!player[uuid]) addPlayer(uuid);
    });
  };
  
  return {
    addPlayer : addPlayer,
    removePlayer : removePlayer,
    getPlayer : getPlayer,
    batchUpdate : batchUpdate,
    updatePlayerLocation : updatePlayerLocation
  };
}());
<commit_msg>Ugh! Typo<commit_after>var playersService = (function(){
  
  var players = [];
  
  var addPlayer = function addPlayer(uuid){
    players[uuid] = {
      uuid : uuid,
      added : new Date()
    };
    return players[uuid];
  };
  
  var removePlayer = function removePlayer(uuid){
    delete players[uuid];
  };
  
  var getPlayer = function getPlayer(uuid){
    return players[uuid];
  };
  
  var updatePlayerLocation = function updatePlayerLocation(uuid, location){
    var player = players[uuid];
    if(!player) player = addPlayer(uuid);
    player.location = location;
    players[uuid] = player;
  };
  
  var batchUpdate = function batchUpdate(participantUUIDs){
    // Remove players that have left
    _.forEach(players, function(player){
      if(!_.contains(participantUUIDs, player.uuid)){
        removePlayer(uuid);
      }
    });    
    /// Add new players
    _.forEach(participantUUIDs, function(uuid){
      if(!player[uuid]) addPlayer(uuid);
    });
  };
  
  return {
    addPlayer : addPlayer,
    removePlayer : removePlayer,
    getPlayer : getPlayer,
    batchUpdate : batchUpdate,
    updatePlayerLocation : updatePlayerLocation,
    getAllPlayers : function(){return players;}
  };
}());

{'fraction_non_alphanumeric': 0.12192066805845511, 'fraction_numerical': 0.0, 'mean_word_length': 3.0610169491525423, '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': '564824', 'n_tokens_mistral': 702, 'n_tokens_neox': 706, 'n_words': 156}