<commit_before>(function(angular) {
    /* Implementation inspired by ngCordova Push */
    angular
        .module('selfbitsAngular')
        .factory('$sbPush', sbPush);

    function sbPush($http, $q, $window, $rootScope, $timeout, sbConfig, $log) {

        var sbPush = {
            push : null,
            pushRegistrationData : null,
            sync: sync,
            init: init,
            unregister: unregister,
            setBadgeNumber: setBadgeNumber
        };

        function sync() {
            if ($window.device && $window.PushNotification && sbPush.pushRegistrationData.registrationId) {
                return $http.post(sbConfig.domain + '/api/v1/user/device/notification', {<commit_msg>Bugfix: Prevent uncaught push sync error<commit_after>(function(angular) {
    /* Implementation inspired by ngCordova Push */
    angular
        .module('selfbitsAngular')
        .factory('$sbPush', sbPush);

    function sbPush($http, $q, $window, $rootScope, $timeout, sbConfig, $log) {

        var sbPush = {
            push: null,
            pushRegistrationData: null,
            sync: sync,
            init: init,
            unregister: unregister,
            setBadgeNumber: setBadgeNumber
        };

        function sync() {
            if ($window.device && $window.device.uuid && $window.PushNotification &&
                sbPush.pushRegistrationData && sbPush.pushRegistrationData.registrationId) {
                return $http.post(sbConfig.domain + '/api/v1/user/device/notification', {
{'fraction_non_alphanumeric': 0.1157619359058208, 'fraction_numerical': 0.0013080444735120995, 'mean_word_length': 2.207547169811321, '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': '6073638', 'n_tokens_mistral': 422, 'n_tokens_neox': 404, 'n_words': 89}