<commit_before>var gErrorMenu =
  {
    DISPLAY_TIME: 2100,
    FADE_OUT_TIME: 400
  };
  
gErrorMenu.displayError = function (message) {
  var selection = d3.select (".errors")
    .append ("span")
    .text (message)
    .classed ("error", true)
    .transition ()
    .delay (gErrorMenu.DISPLAY_TIME)
    .duration (gErrorMenu.FADE_OUT_TIME)
    .ease ("cubic")
    .style ("opacity", 0)
    .remove ();
};<commit_msg>Added a max number of errors<commit_after>var gErrorMenu =
  {
    DISPLAY_TIME: 2100,
    FADE_OUT_TIME: 400,
    MAX_ERRORS: 3
  };
  
gErrorMenu.displayError = function (message) {
  var selection = d3.select (".errors")
    .append ("span")
    .text (message)
    .classed ("error", true)
    .transition ()
    .delay (gErrorMenu.DISPLAY_TIME)
    .duration (gErrorMenu.FADE_OUT_TIME)
    .ease ("cubic")
    .style ("opacity", 0)
    .remove ();
    
  var errors = d3.select (".errors").selectAll ("span").size ();
  
  d3.select (".errors")
    .selectAll ("span")
    .filter (function (junk, i) {
      return i < errors - gErrorMenu.MAX_ERRORS;
    })
    .remove ();
};
{'fraction_non_alphanumeric': 0.15684496826835903, 'fraction_numerical': 0.019038984587488667, 'mean_word_length': 2.7551020408163267, 'pattern_counts': {'":': 0, '<': 4, '<?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': '4065834', 'n_tokens_mistral': 413, 'n_tokens_neox': 397, 'n_words': 87}