<commit_before>/**
 * Created by wermerbalazs on 06/12/15.
 */
(function () {
  'use strict';

  angular
    .module('app')
    .controller('ProductController', ProductController);

  ProductController.$inject = ['cartService'];

  /* @ngInject */
  function ProductController(cartService) {
    var vm = this;

    activate();

    ////////////////

    function activate() {
      vm.amountToAdd = 0;
      vm.clickOnAdd = clickOnAdd;
    }

    function clickOnAdd() {
      var order = {name: vm.object.name, price: vm.object.price, amount: vm.amountToAdd};
      cartService.addToCart(order);
      vm.amountToAdd = 0;
    }

  }

})();
<commit_msg>let's make this shit shinier<commit_after>/**
 * Created by wermerbalazs on 06/12/15.
 */
(function () {
  'use strict';

  angular
    .module('app')
    .controller('ProductController', ProductController);

  ProductController.$inject = ['cartService'];

  /* @ngInject */
  function ProductController(cartService) {
    var vm = this;

    activate();

    ////////////////

    function activate() {
      vm.amountToAdd = 0;
      vm.clickOnAdd = clickOnAdd;
    }

    function clickOnAdd() {
      if (vm.amountToAdd > 0) {
        var order = {name: vm.object.name, price: vm.object.price, amount: vm.amountToAdd};
        cartService.addToCart(order);
        vm.amountToAdd = 0;
      }
    }

  }

})();

{'fraction_non_alphanumeric': 0.1643535427319211, 'fraction_numerical': 0.01241782322863404, 'mean_word_length': 2.425, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, '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': 1, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '964023', 'n_tokens_mistral': 458, 'n_tokens_neox': 431, 'n_words': 89}