<commit_before>'use strict';

angular.module('baseApp')
  .controller('accountsController', ['$scope', '$http', function($scope, $http) {
  var vm = this;
  vm.init = init;
  vm.accounts = [];

  function init(){
    var account = Parse.Object.extend("account");
    var query = new Parse.Query(account);

    query.containedIn("iban", Parse.User.current().get('accounts'));
    // ["1001"]
    query.find({
      success: function(results) {
        // alert("Successfully retrieved " + results.length);
        console.log(results[0].get('balance'));
        vm.accounts = results;
        for (var account in vm.accounts) {
          vm.accounts[account].iban = vm.accounts[account].get('iban');
          vm.accounts[account].name = vm.accounts[account].get('name');
          vm.accounts[account].balance = vm.accounts[account].get('balance');
        }
        console.log(vm.accounts);
        $scope.$apply();

        // Do something with the returned Parse.Object values
        // for (var i = 0; i < results.length; i++) {
        //   var object = results[i];
        //   alert(object.id + ' - ' + object.get('playerName'));
        // }
      },
      error: function(error) {
        // alert("Error: " + error.code + " " + error.message);
      }
    });
  }

}]);<commit_msg>controller as<commit_after>'use strict';

angular.module('baseApp')
  .controller('accountsController', ['$scope', '$http', function($scope, $http) {
  var vm = this;
  vm.init = init;
  vm.accounts = [];
  vm.initOK = initOK;
  function initOK(results) {

     // alert("Successfully retrieved " + results.length);
     console.log(results[0].get('balance'));
     vm.accounts = results;
     for (var account in vm.accounts) {
       vm.accounts[account].iban = vm.accounts[account].get('iban');
       vm.accounts[account].name = vm.accounts[account].get('name');
       vm.accounts[account].balance = vm.accounts[account].get('balance');
     }
     console.log(vm.accounts);
     $scope.$apply();

     // Do something with the returned Parse.Object values
     // for (var i = 0; i < results.length; i++) {
     //   var object = results[i];
     //   alert(object.id + ' - ' + object.get('playerName'));
     // }
  }
  function init(){
    var account = Parse.Object.extend("account");
    var query = new Parse.Query(account);

    query.containedIn("iban", Parse.User.current().get('accounts'));
    // ["1001"]
    query.find({
      success: vm.initOK,
      error: function(error) {
        // alert("Error: " + error.code + " " + error.message);
      }
    });


  }

}]);
{'fraction_non_alphanumeric': 0.18527131782945735, 'fraction_numerical': 0.004651162790697674, 'mean_word_length': 2.6047486033519553, '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': '367997', 'n_tokens_mistral': 821, 'n_tokens_neox': 794, 'n_words': 149}