<commit_before>(function(){
'use strict';

  angular
    .module('secondLead')

    .controller('DramaCtrl', [
      'drama',
      'Gridster',
      'RatingModel',
      'Restangular',
      'UserModel',
      'ListModel',
      function (drama, Gridster, RatingModel, Restangular, UserModel, ListModel) {
      var ctrl = this;

      ctrl.drama            = drama.drama;
      ctrl.user             = '';
      ctrl.selectedList     = {};
      ctrl.name             = drama.drama.name;
      ctrl.non_english_name = drama.drama.non_english_name;
      ctrl.episode_count    = drama.drama.episode_count;
      ctrl.year             = drama.drama.release_date;
      ctrl.description      = drama.drama.plot;
      ctrl.dramaId          = drama.drama.id;
      ctrl.image_url        = drama.drama.image_url;

      var authorized = function () {
        if (UserModel.currentUser()) {
          ctrl.user      = UserModel.currentUser();
          ctrl.userLists = ListModel.currentUserLists(ctrl.user.id);
        }
      };

      var avgRate = function (drama){
        RatingModel.getAvg(drama).then(function(result){
          ctrl.avgRating = result;
        });
      }

      var initialize = function () {
        authorized();
        avgRate(drama.drama.id);
      };
      initialize();
    }])
})();<commit_msg>added new fields to controller<commit_after>(function(){
'use strict';

  angular
    .module('secondLead')

    .controller('DramaCtrl', [
      'drama',
      'Gridster',
      'RatingModel',
      'Restangular',
      'UserModel',
      'ListModel',
      function (drama, Gridster, RatingModel, Restangular, UserModel, ListModel) {
      var ctrl = this;

      ctrl.drama            = drama.drama;
      ctrl.user             = '';
      ctrl.selectedList     = {};
      ctrl.name             = drama.drama.name;
      ctrl.non_english_name = drama.drama.non_english_name;
      ctrl.episode_count    = drama.drama.episode_count;
      ctrl.year             = drama.drama.release_date;
      ctrl.description      = drama.drama.plot;
      ctrl.dramaId          = drama.drama.id;
      ctrl.image_url        = drama.drama.image_url;
      ctrl.country          = drama.drama.language;
      ctrl.romanized_title  = drama.drama.romanized_title;
      ctrl.also_known_as    = drama.drama.also_known_as;
      ctrl.network          = drama.drama.network;
      ctrl.broadcast_period = drama.drama.broadcast_period;
      ctrl.rating           = drama.drama.rating;
      ctrl.viki_url         = drama.drama.viki_url;
      ctrl.drama_fever_url  = drama.drama.drama_fever_url;

      var authorized = function () {
        if (UserModel.currentUser()) {
          ctrl.user      = UserModel.currentUser();
          ctrl.userLists = ListModel.currentUserLists(ctrl.user.id);
        }
      };

      var avgRate = function (drama){
        RatingModel.getAvg(drama).then(function(result){
          ctrl.avgRating = result;
        });
      }

      var initialize = function () {
        authorized();
        avgRate(drama.drama.id);
      };
      initialize();
    }])
})();
{'fraction_non_alphanumeric': 0.12166076601223044, 'fraction_numerical': 0.0, 'mean_word_length': 1.9210526315789473, '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': '7246655', 'n_tokens_mistral': 972, 'n_tokens_neox': 945, 'n_words': 144}