<commit_before>app.service('resultsService', function() {
  var results = new Array();

  var addItem = function(id, date, content) {
    var obj = new Object();
    obj['id'] = id;
    obj['date'] = date;
    obj['content'] = content;
    results.unshift(obj);
  }

  var getItems = function() {
    return results;
  }

  var deleteItem = function(id) {
    for(var i=0; i<results.length; i++) {
      if(results[i].id === id) {
        results.splice(i, 1);
      }
    }<commit_msg>Added array sorting DESC to fix fetching bug<commit_after>app.service('resultsService', function() {
  var results = new Array();

  var addItem = function(id, date, content) {
    var obj = new Object();
    obj['id'] = id;
    obj['date'] = date;
    obj['content'] = content;
    results.unshift(obj);
    results.sort(function(a, b) {
      return parseFloat(b.id) - parseFloat(a.id);
    });
  }

  var getItems = function() {
    return results;
  }

  var deleteItem = function(id) {
    for(var i=0; i<results.length; i++) {
      if(results[i].id === id) {
        results.splice(i, 1);
      }
    }
{'fraction_non_alphanumeric': 0.1689497716894977, 'fraction_numerical': 0.0036529680365296802, 'mean_word_length': 2.779310344827586, 'pattern_counts': {'":': 0, '<': 5, '<?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': '5351730', 'n_tokens_mistral': 381, 'n_tokens_neox': 370, 'n_words': 88}