<commit_before>var signup = angular.module('Signup', []);

signup.controller('SignupController', ['$scope', '$rootScope', 'ParseSvc', function ($scope, $rootScope, ParseSvc) {
    $scope.show_error = false;
    $scope.error_msg;

    var signupCallback = function (success, message) {
        if(success) {
            $rootScope.$broadcast('new username', ParseSvc.getUsername());
            window.location.reload();
        } else {
            $scope.show_error = true;
            $scope.error_msg = 'ERROR: ' + message;
        }
        $scope.$apply();
    }

    $scope.user = {
        username: null,
        password: <PASSWORD>,
        password2: <PASSWORD>,
        email: null,
        name: null
    };
    if (ParseSvc.isRegistered) {
        $rootScope.username = ParseSvc.getUsername();
    }
    $scope.signUp = function () {
        if ($scope.user.password !== $scope.<PASSWORD>) {
            $scope.show_error = true;
            $scope.error_msg = 'ERROR: Passwords do not match';
            return;<commit_msg>Reroute successful signup to home page<commit_after>var signup = angular.module('Signup', []);

signup.controller('SignupController', ['$location', '$scope', '$rootScope', 'ParseSvc', function ($location, $scope, $rootScope, ParseSvc) {
    $scope.show_error = false;
    $scope.error_msg;

    var signupCallback = function (success, message) {
        if(success) {
            $rootScope.$broadcast('new username', ParseSvc.getUsername());
            $location.path('/');
        } else {
            $scope.show_error = true;
            $scope.error_msg = 'ERROR: ' + message;
        }
        $scope.$apply();
    }

    $scope.user = {
        username: null,
        password: <PASSWORD>,
        password2: <PASSWORD>,
        email: null,
        name: null
    };
    if (ParseSvc.isRegistered) {
        $rootScope.username = ParseSvc.getUsername();
    }
    $scope.signUp = function () {
        if ($scope.user.password !== $scope.user.password2) {
            $scope.show_error = true;
            $scope.error_msg = 'ERROR: Passwords do not match';
            return;
{'fraction_non_alphanumeric': 0.14769520225776106, 'fraction_numerical': 0.0014111006585136407, 'mean_word_length': 2.2874806800618237, 'pattern_counts': {'":': 0, '<': 8, '<?xml version=': 0, '>': 8, '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': '5304910', 'n_tokens_mistral': 637, 'n_tokens_neox': 631, 'n_words': 126}