<commit_before>var m = require('mithril');

var User = module.exports = {

  getUser: function(data, callback){
    return m.request({ method: 'GET', url: 'api/applications/' + data}).then(function(x){callback(x)})
  },


  arrange: function(users,callback){
    var apps = {1: [], 2: [], 3: [], 4: [], 5: []};
    ctrl.user_uid = users;

    User.getUser(users, function(applicationsResponse) {
      if (!Array.isArray(applicationsResponse.Application)) {
        apps = false;
      } else {
        apps = {1: [], 2: [], 3: [], 4: [], 5: []};
        applicationsResponse.Application.forEach(function(app){
          apps[app.phase].push(app);
        });
      }
       callback({apps: apps});
    });
  }

};<commit_msg>fixing outcomes filter bug<commit_after>var m = require('mithril');

var User = module.exports = {

  getUser: function(data, callback){
    return m.request({ method: 'GET', url: 'api/applications/' + data}).then(function(x){callback(x)})
  },


  arrange: function(users,callback){
    var apps = {1: [], 2: [], 3: [], 4: [], 5: []};

    User.getUser(users, function(applicationsResponse) {
      if (!Array.isArray(applicationsResponse.Application)) {
        apps = false;
      } else {
        apps = {1: [], 2: [], 3: [], 4: [], 5: []};
        applicationsResponse.Application.forEach(function(app){
          apps[app.phase].push(app);
        });
      }
       callback({apps: apps});
    });
  }

};
{'fraction_non_alphanumeric': 0.1995827538247566, 'fraction_numerical': 0.013908205841446454, 'mean_word_length': 2.910326086956522, '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': '5503262', 'n_tokens_mistral': 475, 'n_tokens_neox': 452, 'n_words': 89}