<commit_before>$('#update-task').click( function() {

  task_title = $('#taskTitle-data').val();
  task_desc = $('#task-desc').val();
  task_urgency = $('#urgent-data').val();
  reservation = $('#reservation').val();
  task_category = $('#category-data').val();
  contactPersons = $('#contactPersons').val();
  locationData = $('#locationData').val();
  contactPersons = $('#contactPersons').val();

  console.log("in update");

  data = { "task_id": task_id, "username": username, "title": task_title, "description": task_desc,
                "due_date": reservation, "contactPersons": contactPersons, "locationData": locationData, 
                "task_urgency": task_urgency };

  userData = JSON.stringify(data);

  NProgress.set(0.0);

  $.ajax({
    type: 'POST',
    url: '/api/editTask/'+ task_id + '/',
    contentType: 'application/json',

    success: function(result) {
      console.log(result);
      console.log(result.response);

      NProgress.set(1.0);

      $.gritter.add({
        title: 'Task Updated',
        text: 'Task Successfully Updated',
        class_name: 'success'
      });

    },
    fail: function(result) {
      alert('Failed to send Data');
    },

    data: userData
  });

  console.log(userData);
});


$('#delete-task').click( function() {

  NProgress.set(0.0);
  data = { "task_id": task_id };
<commit_msg>task update<commit_after>$('#update-task').click( function() {

  task_title = $('#taskTitle-data').val();
  task_desc = $('#task-desc').val();
  task_urgency = $('#urgent-data').val();
  reservation = $('#reservation').val();
  task_category = $('#category-data').val();
  contactPersons = $('#contactPersons').val();
  locationData = $('#locationData').val();
  contactPersons = $('#contactPersons').val();

  console.log("in update");

  data = { "task_id": task_id, "username": username, "title": task_title, "description": task_desc,
                "due_date": reservation, "contactPersons": contactPersons, "locationData": locationData, 
                "task_urgency": task_urgency };

  userData = JSON.stringify(data);

  NProgress.set(0.0);

  $.ajax({
    type: 'POST',
    url: '/api/editTask/'+ task_id + '/',
    contentType: 'application/json',

    success: function(result) {
      console.log(result);
      console.log(result.response);

      NProgress.set(1.0);

      $.gritter.add({
        title: 'Task Updated',
        text: 'Task Successfully Updated',
        class_name: 'success'
      });

    },
    fail: function(result) {
      alert('Failed to send Data');
    },

    data: userData
  });

  console.log(userData);
});


$('#delete-task').click( function() {

  NProgress.set(0.0);
  data = { "task_id": task_id, "username": username };

{'fraction_non_alphanumeric': 0.1978021978021978, 'fraction_numerical': 0.004395604395604396, 'mean_word_length': 3.3212025316455698, 'pattern_counts': {'":': 19, '<': 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': '5419634', 'n_tokens_mistral': 883, 'n_tokens_neox': 848, 'n_words': 159}