<commit_before>  window.DynamicFields = {

    initialize: function() {
      /* Any fields marked with the class 'dynamic_field' will have an add button appended
       * to the DOM after the label */	
      this.add_button_to_controls();

      $(document).on('click', '.add-dynamic-field', function(event){
        /* When we click the add button we need to manipulate the parent container, which
	 * is a <div class="controls dynamic"> wrapper */
	/* CSS selectors are faster than doing a last() call in jQuery */
        var input_template = $(this).parent().find('input:last');
	/* By doing this we should just keep pushing the add button down as the last
	 * element of the parent container */
	var new_input = $(input_template).clone();
        $(input_template).after(new_input);<commit_msg>Fixing bug where new form fields included the value of the last input instead of being empty<commit_after>  window.DynamicFields = {

    initialize: function() {
      /* Any fields marked with the class 'dynamic_field' will have an add button appended
       * to the DOM after the label */	
      this.add_button_to_controls();

      $(document).on('click', '.add-dynamic-field', function(event){
        /* When we click the add button we need to manipulate the parent container, which
	 * is a <div class="controls dynamic"> wrapper */
	/* CSS selectors are faster than doing a last() call in jQuery */
        var input_template = $(this).parent().find('input:last');
	/* By doing this we should just keep pushing the add button down as the last
	 * element of the parent container */
	var new_input = $(input_template).clone().attr('value', '');
        $(input_template).after(new_input);
{'fraction_non_alphanumeric': 0.10960518562168532, 'fraction_numerical': 0.0, 'mean_word_length': 3.433420365535248, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '5886911', 'n_tokens_mistral': 444, 'n_tokens_neox': 431, 'n_words': 185}