<commit_before>function Comment(attributes) {
  this.id = attributes.id;
  this.content = attributes.content;
  this.recipe_id = attributes.recipe_id;
  this.user_id = attributes.user_id;
  this.user.email = attributes.user.email;
}


var nextComments = function() {
  var nextId = parseInt($(".js-next").attr("data-id")) + 1;
  $.get("/recipes/" + nextId + "/comments", function(data) {
      data["comments"].forEach(function(comment) {
        var comment = new Comment(comment)
        var recipeComments = []
        recipeComments.push(comment)
      })
  });
}

$(function () {
  $(".js-next").on("click", nextComments)
})
<commit_msg>fix this.user in comment constructor; move var recipeComments<commit_after>function Comment(attributes) {
  this.id = attributes.id;
  this.content = attributes.content;
  this.recipe_id = attributes.recipe_id;
  this.user_id = attributes.user_id;
  this.user = attributes.user;
}

var nextComments = function() {
  var nextId = parseInt($(".js-next").attr("data-id")) + 1;
  var recipeComments = []

  $.get("/recipes/" + nextId + "/comments", function(data) {
      data["comments"].forEach(function(comment) {
        var comment = new Comment(comment)
        recipeComments.push(comment)
      })
      console.log(recipeComments)
  });
}

$(function () {
  $(".js-next").on("click", nextComments)
})

{'fraction_non_alphanumeric': 0.16691394658753708, 'fraction_numerical': 0.001483679525222552, 'mean_word_length': 3.667820069204152, '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': '227535', 'n_tokens_mistral': 436, 'n_tokens_neox': 425, 'n_words': 76}