<commit_before>var machina = (function(m, $) {

	function cloneFormset(selector, type) {
		var newElement = $(selector).clone(true);
		var total = $('#id_' + type + '-TOTAL_FORMS').val();

		newElement.find(':input').each(function() {
			// update the name and id of the input field
			var new_name = $(this).attr('name').replace('-' + (total-1) + '-','-' + total + '-');
			$(this).attr('name', new_name);
			var new_id = $(this).attr('id').replace('-' + (total-1) + '-','-' + total + '-');
			$(this).attr('id', new_id);
			if ($(this).is(':checkbox')) {
				$(this).attr('checked', false);
			}
			else {
				$(this).attr('value', '');
			}
		});
		$('#id_' + type + '-TOTAL_FORMS').val(parseInt(total)+1);
		$(selector).after(newElement);
	}

	m.poll = {
		init: function(add_more_selector, last_form_selector) {
			if(typeof(add_more_selector) === 'undefined') add_more_selector = '#add_more_poll_option';
			if(typeof(last_form_selector) === 'undefined') last_form_selector = '#poll_formset div.poll-option-form:last';

			$(add_more_selector).click(function(ev) {
				cloneFormset(last_form_selector, 'form');
			});<commit_msg>'poll' ui js updated<commit_after>var machina = (function(m, $) {

	function cloneFormset(selector, type) {
		var new_element = $(selector).clone(true);
		var total = $('#id_' + type + '-TOTAL_FORMS').val();

		new_element.find(':input').each(function() {
			// update the name and id of the input field
			var new_name = $(this).attr('name').replace('-' + (total-1) + '-','-' + total + '-');
			$(this).attr('name', new_name);
			var new_id = $(this).attr('id').replace('-' + (total-1) + '-','-' + total + '-');
			$(this).attr('id', new_id);
			if ($(this).is(':checkbox')) {
				$(this).attr('checked', false);
			}
			else {
				$(this).attr('value', '');
			}
		});
		$('#id_' + type + '-TOTAL_FORMS').val(parseInt(total)+1);
		$(selector).after(new_element);
	}

	m.poll = {
		init: function(add_more_selector, last_form_selector) {
			if(typeof(add_more_selector) === 'undefined') add_more_selector = '#add_more_poll_option';
			if(typeof(last_form_selector) === 'undefined') last_form_selector = '#poll_formset div.poll-option-form:last';

			$(add_more_selector).click(function(ev) {
				cloneFormset(last_form_selector, 'form');
			});
{'fraction_non_alphanumeric': 0.22894736842105262, 'fraction_numerical': 0.002631578947368421, 'mean_word_length': 4.354460093896714, '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': '4099253', 'n_tokens_mistral': 904, 'n_tokens_neox': 801, 'n_words': 131}