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

    var app = angular.module('app', []);

    app.controller('TodoCtrl', ['$scope', function ($scope) {
        $scope.tasks = [];

        $scope.addTask = function (task) {
            if (task.trim().length > 0) {
                $scope.tasks.push({
                    title: task
                });
                $scope.$digest();
            }
        }
    }]);

    app.directive('todoList', function () {
        return {
            restrict: 'E',
            scope: {
                tasks: '='
            },
            link: function (scope, elem) {
                scope.$watchCollection('tasks', function (val) {
                    React.renderComponent(
                        TodoList({tasks: val}),
                        elem[0]
                    );
                });
            }
        }
    });

    app.directive('todoForm', function () {
        return {
            restrict: 'E',
            link: function (scope, elem) {
                var form = TodoForm({scope: scope, model: 'taskInput'});
                React.renderComponent(
                    form, elem[0]
                );
            }
        };
    });

}(window, angular));<commit_msg>Improves<commit_after>(function (window, angular) {
    'use strict';

    var app = angular.module('app', []);

    app.controller('TodoCtrl', ['$scope', function ($scope) {
        $scope.tasks = [];

        $scope.addTask = function (task) {
            if (task.trim().length > 0) {
                $scope.tasks.push({
                    title: task
                });
                $scope.$digest();
            }
        }
    }]);

    app.directive('todoList', function () {
        return {
            restrict: 'E',
            scope: {
                tasks: '='
            },
            link: function (scope, elem) {
                scope.$watchCollection('tasks', function (val) {
                    React.renderComponent(
                        TodoList({tasks: val}),
                        elem[0]
                    );
                });
            }
        }
    });

    app.directive('todoForm', function () {
        return {
            restrict: 'E',
            link: function (scope, elem) {
                React.renderComponent(
                    TodoForm({scope: scope}), elem[0]
                );
            }
        };
    });

}(window, angular));
{'fraction_non_alphanumeric': 0.14332247557003258, 'fraction_numerical': 0.0024429967426710096, 'mean_word_length': 1.0982066609735268, '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': '2826915', 'n_tokens_mistral': 658, 'n_tokens_neox': 622, 'n_words': 116}