<commit_before>$( document ).ready(function() {
  glyphiconPlusListener();
});

// methods for validating and adding form fields

function hideAllMethodNameErrorMessages() {
  $("#method-name-error, #method-name-uniqueness-error, #hidden-input-error").hide();
}

function addFormFields() {
  $("div#last-gem-method", "input#last-method-field",
   "input#last-datatype-method-field").removeAttr("id");

  var $glyphicon = $(".fa-plus-square-o"),
      $newFormDiv = $("<div>");

  $newFormDiv.attr("id", "last-gem-method");

  var newFormField = '<label for="method_name[]">Method Name</label>' +
    '<span class="error-message" id="method-name-error" style="display: none;"><br> A method name can\'t be less than 3 characters.</span>' +
    '<span class="error-message" id="method-name-uniqueness-error" style="display: none;"><br> Method names must be unique.</span>' +
    '<input class="form-control" id="last-method-field" name="method_name[]" type="text" value=""><br>' +
    '<label for="method-data">Is this the data you want?</label>' +
    '<span class="error-message" id="hidden-input-error" style="display: none;"><br> You must pick a target before adding more fields.</span>' +
    '<p><span class="last-data-field"></span></p>' +
    '<input class="last_path" name="last_path[]" type="hidden" value="">' +
    '<input class="method_datatypes" name="method_datatypes[]" type="hidden" value="">';

  $newFormDiv.append(newFormField);

  $("label[for='method-data-1']").text("This is the data you want.");

  $glyphicon.parent().removeAttr();

  $("#gem-methods").find("input").each(function(){
      $(this).attr("readonly", "readonly");
  });
  
  $glyphicon.before($newFormDiv);
  $("span#method-name-error").hide();<commit_msg>fixes the clear button that was broken<commit_after>$( document ).ready(function() {
  glyphiconPlusListener();
});

// methods for validating and adding form fields

function hideAllMethodNameErrorMessages() {
  $("#method-name-error, #method-name-uniqueness-error, #hidden-input-error").hide();
}

function addFormFields() {
  $("div#last-gem-method").removeAttr("id");
  $("input#last-method-field").removeAttr("id");

  var $glyphicon = $(".fa-plus-square-o"),
      $newFormDiv = $("<div>");

  $newFormDiv.attr("id", "last-gem-method");

  var newFormField = '<label for="method_name[]">Method Name</label>' +
    '<span class="error-message" id="method-name-error" style="display: none;"><br> A method name can\'t be less than 3 characters.</span>' +
    '<span class="error-message" id="method-name-uniqueness-error" style="display: none;"><br> Method names must be unique.</span>' +
    '<input class="form-control" id="last-method-field" name="method_name[]" type="text" value=""><br>' +
    '<label for="method-data">Is this the data you want?</label>' +
    '<span class="error-message" id="hidden-input-error" style="display: none;"><br> You must pick a target before adding more fields.</span>' +
    '<p><span class="last-data-field"></span></p>' +
    '<input class="last_path" name="last_path[]" type="hidden" value="">' +
    '<input class="method_datatypes" name="method_datatypes[]" type="hidden" value="">';

  $newFormDiv.append(newFormField);

  $("label[for='method-data-1']").text("This is the data you want.");

  $glyphicon.parent().removeAttr();

  $("#gem-methods").find("input").each(function(){
      $(this).attr("readonly", "readonly");
  });
  
  $glyphicon.before($newFormDiv);
  $("span#method-name-error").hide();
{'fraction_non_alphanumeric': 0.21678121420389462, 'fraction_numerical': 0.001145475372279496, 'mean_word_length': 5.2042628774422734, 'pattern_counts': {'":': 0, '<': 47, '<?xml version=': 0, '>': 47, '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': '2759131', 'n_tokens_mistral': 1136, 'n_tokens_neox': 1121, 'n_words': 222}