<commit_before>/* backfeed.js */
var Backfeed = (function() {
  "use strict";
  //define classes to add/remove
  const errorStatusClass = 'glyphicon-remove';
  const errorGroupClass = 'has-error';
  const successStatusClass = 'glyphicon-ok';
  const successGroupClass = 'has-success';

  //attach change listeners to each input
  var watchInputs = function(inputList) {
    for (let formInput in inputList) {
      var currInput = inputList[formInput];
      _registerListener('keyup', currInput['input'], currInput['status'], currInput['group']);
    }
  };
  
  //Add an event listener to a single form input
  var _registerListener = function(eventName, element, status, group) {
    element.addEventListener(eventName, function invoke(event) {
      _updateStatus(event, status, group);
    }, false);
  };

  //update the classes of the usernameInput field
  var _updateStatus = function(event, statusTag, groupTag) {
    var statusClasses = statusTag.classList;
    var groupClasses = groupTag.classList;
    if (event.target.checkValidity()) {<commit_msg>Refactor to accept ids instead of objects.<commit_after>/* backfeed.js */
var Backfeed = (function() {
  "use strict";
  //define classes to add/remove
  const errorStatusClass = 'glyphicon-remove';
  const errorGroupClass = 'has-error';
  const successStatusClass = 'glyphicon-ok';
  const successGroupClass = 'has-success';

  //attach change listeners to each input
  var watchInputs = function(inputList) {
    for (let formInput in inputList) {
      var currInput = inputList[formInput];
      _registerListener('keyup', currInput['input'], currInput['status'], currInput['group']);
    }
  };
  
  //Add an event listener to a single form input
  var _registerListener = function(eventName, element, status, group) {
    element = document.getElementById(element);
    status = document.getElementById(status);
    group = document.getElementById(group);
    element.addEventListener(eventName, function invoke(event) {
      _updateStatus(event, status, group);
    }, false);
  };

  //update the classes of the usernameInput field
  var _updateStatus = function(event, statusTag, groupTag) {
    var statusClasses = statusTag.classList;
    var groupClasses = groupTag.classList;
    if (event.target.checkValidity()) {
{'fraction_non_alphanumeric': 0.11348756001745962, 'fraction_numerical': 0.0, 'mean_word_length': 4.116071428571429, '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': '4837891', 'n_tokens_mistral': 636, 'n_tokens_neox': 641, 'n_words': 184}