<commit_before>const $ = require('jquery');
exports.$ = $
exports.addQuestion = function addQuestion(questionName, question, responseSets) {
  const tbl = $('#questionTable > tbody:last-child')
  var responseSetsSelect = "<label for='response_set_ids'>Response Sets</label><select name='response_set_ids[]' id='response_set_ids'>";
  responseSetsSelect += "<option aria-label=' '></option>";
  responseSets.forEach(function(rs){
    responseSetsSelect += '<option value="'
    responseSetsSelect += rs.id
    responseSetsSelect += '">'
    responseSetsSelect += rs.name
    responseSetsSelect += '</option>';
  });
  responseSetsSelect += "</select>";
  var remove =   '<td><a href="javascript:forms.removeQuestion(\'#question_id_'+question+'\')">Remove<a></td>'
  var appendString = '<tr><td>' + questionName + '</td><input aria-label="Question IDs" id="question_id_'+question+'" type="hidden" name="question_ids[]" value="' + question + '"/><td>' + responseSetsSelect + '</td>'+remove+'</tr>'
  tbl.append(appendString);
}


exports.removeQuestion = function removeQuestion(td){
  $(td).parent('tr').remove();
  console.log(td)
}<commit_msg>fixing issue with javascript call in anchor tag, was missing SDP prefix<commit_after>const $ = require('jquery');
exports.$ = $
exports.addQuestion = function addQuestion(questionName, question, responseSets) {
  const tbl = $('#questionTable > tbody:last-child')
  var responseSetsSelect = "<label for='response_set_ids'>Response Sets</label><select name='response_set_ids[]' id='response_set_ids'>";
  responseSetsSelect += "<option aria-label=' '></option>";
  responseSets.forEach(function(rs){
    responseSetsSelect += '<option value="'
    responseSetsSelect += rs.id
    responseSetsSelect += '">'
    responseSetsSelect += rs.name
    responseSetsSelect += '</option>';
  });
  responseSetsSelect += "</select>";
  var remove =   '<td><a href="javascript:SDP.forms.removeQuestion(\'#question_id_'+question+'\')">Remove<a></td>'
  var appendString = '<tr><td>' + questionName + '</td><input aria-label="Question IDs" id="question_id_'+question+'" type="hidden" name="question_ids[]" value="' + question + '"/><td>' + responseSetsSelect + '</td>'+remove+'</tr>'
  tbl.append(appendString);
}


exports.removeQuestion = function removeQuestion(td){
  $(td).parent('tr').remove();
  console.log(td)
}
{'fraction_non_alphanumeric': 0.19080068143100512, 'fraction_numerical': 0.0, 'mean_word_length': 6.054054054054054, 'pattern_counts': {'":': 0, '<': 41, '<?xml version=': 0, '>': 43, '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': '5784927', 'n_tokens_mistral': 700, 'n_tokens_neox': 688, 'n_words': 133}