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

  angular.module('app')
    .controller('counterController', counterController)
    .controller('todoController', todoController)


    counterController.$inject = []
    todoController.$inject = []

    function counterController(){
      this.counter = 0;

      this.add = function() {
       this.counter >= 10 ? this.counter : this.counter ++;
      }

      this.sub = function(){
        this.counter === 0 ? this.counter : this.counter --;
      }
    };

    function todoController(){
      this.tasks = [{name: "Brush Your Teeth", complete: true}, {name: "Tie Shoes", complete: false}];
      this.newTask = '';
      this.completed = 1;
      this.total = this.tasks.length;

      this.add = function(){
        console.log(this.newTask)
        this.tasks.push({name: this.newTask, complete: false});

        this.total = this.tasks.length;
      }.bind(this)

      this.complete = function(taskIndex){
        console.log(taskIndex);
        this.tasks[taskIndex].complete = true;
        this.
         this.completed = this.tasks.reduce(function(p, n){
          return n.complete === true ? p + 1 : p;
        }, 0);

        this.removeCompleted= function(){

        };

      }

    }
<commit_msg>Fix input submit, now clear itself after submit<commit_after>(function (angular){
  'use strict';

  angular.module('app')
    .controller('counterController', counterController)
    .controller('todoController', todoController)


    counterController.$inject = []
    todoController.$inject = []

    function counterController(){
      this.counter = 0;

      this.add = function() {
       this.counter >= 10 ? this.counter : this.counter ++;
      }

      this.sub = function(){
        this.counter === 0 ? this.counter : this.counter --;
      }
    };

    function todoController(){
      this.tasks = [{name: "Brush Your Teeth", complete: true}, {name: "Tie Shoes", complete: false}];
      this.newTask = '';
      this.completed = 1;
      this.total = this.tasks.length;
      this.showCompleted = true


      this.add = function(){
        console.log(this.newTask)
        this.tasks.push({name: this.newTask, complete: false});
        this.newTask = ''
        this.total = this.tasks.length;
      }.bind(this)

      this.complete = function(taskIndex){
        console.log(taskIndex);
        this.tasks[taskIndex].complete = true;

         this.completed = this.tasks.reduce(function(p, n){
          return n.complete === true ? p + 1 : p;
        }, 0);
      }

      this.hideCompleted= function(){
        showCompleted = false
        };

    }

{'fraction_non_alphanumeric': 0.14533786334465837, 'fraction_numerical': 0.005285013212533031, 'mean_word_length': 2.3042394014962593, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '566709', 'n_tokens_mistral': 790, 'n_tokens_neox': 742, 'n_words': 159}