<commit_before>
function controller(events) {
  var errorsElement  = document.querySelector("#errors"),
      markersElement = document.querySelector(".markers"),
      outputElement  = document.querySelector("#output"),
      inputsElement  = document.querySelector("#events"),
      dateEvents     = makeDateEvents(events),
      errors         = checkForErrors(dateEvents);

  removeAllChildren(markersElement);
  removeAllChildren(errorsElement);

  hide(errorsElement);
  hide(outputElement);

  forEach(inputsElement.querySelectorAll(".form-group"), function (inputElement) {
    inputElement.classList.remove("has-error");
  });

  if(errors.messages.length > 0) {
    forEach(errors.eventNumbers, function (number) {
      inputsElement.querySelector(".form-group:nth-child(" + number + ")").classList.add("has-error");
    });
    errorsElement.appendChild(buildList(errors.messages));
    show(errorsElement);
  }
  else if(dateEvents.length >= 2) {
    // Creates the circled markers above the progress bar
    forEach(makeEventMarkers, function (marker) {
      markersElement.appendChild(marker);<commit_msg>Fix #3 Markers are now displayed again<commit_after>
function controller(events) {
  var errorsElement  = document.querySelector("#errors"),
      markersElement = document.querySelector(".markers"),
      outputElement  = document.querySelector("#output"),
      inputsElement  = document.querySelector("#events"),
      dateEvents     = makeDateEvents(events),
      errors         = checkForErrors(dateEvents);

  removeAllChildren(markersElement);
  removeAllChildren(errorsElement);

  hide(errorsElement);
  hide(outputElement);

  forEach(inputsElement.querySelectorAll(".form-group"), function (inputElement) {
    inputElement.classList.remove("has-error");
  });

  if(errors.messages.length > 0) {
    forEach(errors.eventNumbers, function (number) {
      inputsElement.querySelector(".form-group:nth-child(" + number + ")").classList.add("has-error");
    });
    errorsElement.appendChild(buildList(errors.messages));
    show(errorsElement);
  }
  else if(dateEvents.length >= 2) {
    // Creates the circled markers above the progress bar
    forEach(makeEventMarkers(dateEvents), function (marker) {
      markersElement.appendChild(marker);
{'fraction_non_alphanumeric': 0.1303203159280386, 'fraction_numerical': 0.002193944712593243, 'mean_word_length': 4.493975903614458, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, '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': '3332534', 'n_tokens_mistral': 616, 'n_tokens_neox': 607, 'n_words': 103}