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

  var _development = null;

  function $RavenProvider() {

    this.development = function(config) {
      _development = config || _development;
      return this;
    };

    this.$get = ['$window', '$log', function($window, $log) {
      var service = {
        VERSION: ($window.Raven) ? $window.Raven.VERSION : 'development',
        TraceKit: ($window.Raven) ? $window.Raven.TraceKit : 'development',
        captureException: function captureException(exception, cause) {
          if (!_development) {
            $window.Raven.captureException(exception, cause);
          } else {
            $log.error('Raven: Exception ', exception, cause);
          }
        },
        captureMessage: function captureMessage(message, data) {
          if (!_development) {
            $window.Raven.captureMessage(message, data);
          } else {
            $log.error('Raven: Message ', message, data);
          }
        },
        setUser: function setUser(user) {
          if (_development) {
            $log.info('Raven: User ', user);
          } else {
            if ($window.Raven.setUser) {
              $window.Raven.setUser(user);
            } else if ($window.Raven.setUserContext) {
              $window.Raven.setUserContext(user);
            }
          }
        },
        setUserContext: function setUserContext(user) {
          if (_development) {
            $log.info('Raven: User ', user);
          } else {
            if ($window.Raven.setUserContext) {
              $window.Raven.setUserContext(user);
            } else if ($window.Raven.setUser) {
              $window.Raven.setUser(user);
            }
          }
        },
        lastException: function lastException() {
          if (_development) {
            $log.error('Raven: Last Exception');
          } else {
            $window.Raven.lastException();
          }
        },
        setExtraContext: function setExtraContext(data) {
          if (_development) {
            $log.info('Raven: Extra Context ', data);
          } else {
            $window.Raven.setExtraContext(data);
          }
        },
        setTagsContext: function setTagsContext(data) {
          if (_development) {
            $log.info('Raven: Tags Context ', data);
          } else {
            $window.Raven.setTagsContext(data);
          }
        },
        context: function context(options, func, args) {
          var RavenService = this;

          if (angular.isFunction(options)) {
            args = func || [];
            func = options;
            options = undefined;
          }

          return RavenService.wrap(options, func).apply(RavenService, args);
        },
        wrap: function wrap(options, func) {
          var RavenService = this;

          if (angular.isUndefined(func) && !angular.isFunction(options)) {
            return options;
          }

          if (angular.isFunction(options)) {
            func = options;
            options = undefined;
          }

          if (!angular.isFunction(func)) {
            return func;
          }

          if (func.__raven__) {
            return func;
          }

          function wrapped() {
            var args = [], i = arguments.length;
            while(i--) {
              args[i] = RavenService.wrap(options, arguments[i]);
            }
            try {
              return func.apply(this, args);
            } catch(e) {
              RavenService.captureException(e, options);
            }
          }

          for (var property in func) {
            if (func.hasOwnProperty(property)) {
              wrapped[property] = func[property];
            }
          }
          wrapped.__raven__ = true;
          return wrapped;
        }

      };

      return service;
    }]; // end $get
  } // end provider

  function $ExceptionHandlerProvider($provide) {
    $provide.decorator('$exceptionHandler', [
      '$delegate', '$raven', '$injector',
      $ExceptionHandlerDecorator
    ]);
  }
<commit_msg>Avoid jshint errors.<commit_after>(function(global, angular, undefined) {
  'use strict';

  var _development = null;

  function $RavenProvider() {

    this.development = function(config) {
      _development = config || _development;
      return this;
    };

    this.$get = ['$window', '$log', function($window, $log) {
      var service = {
        VERSION: ($window.Raven) ? $window.Raven.VERSION : 'development',
        TraceKit: ($window.Raven) ? $window.Raven.TraceKit : 'development',
        captureException: function captureException(exception, cause) {
          if (!_development) {
            $window.Raven.captureException(exception, cause);
          } else {
            $log.error('Raven: Exception ', exception, cause);
          }
        },
        captureMessage: function captureMessage(message, data) {
          if (!_development) {
            $window.Raven.captureMessage(message, data);
          } else {
            $log.error('Raven: Message ', message, data);
          }
        },
        setUser: function setUser(user) {
          if (_development) {
            $log.info('Raven: User ', user);
          } else {
            if ($window.Raven.setUser) {
              $window.Raven.setUser(user);
            } else if ($window.Raven.setUserContext) {
              $window.Raven.setUserContext(user);
            }
          }
        },
        setUserContext: function setUserContext(user) {
          if (_development) {
            $log.info('Raven: User ', user);
          } else {
            if ($window.Raven.setUserContext) {
              $window.Raven.setUserContext(user);
            } else if ($window.Raven.setUser) {
              $window.Raven.setUser(user);
            }
          }
        },
        lastException: function lastException() {
          if (_development) {
            $log.error('Raven: Last Exception');
          } else {
            $window.Raven.lastException();
          }
        },
        setExtraContext: function setExtraContext(data) {
          if (_development) {
            $log.info('Raven: Extra Context ', data);
          } else {
            $window.Raven.setExtraContext(data);
          }
        },
        setTagsContext: function setTagsContext(data) {
          if (_development) {
            $log.info('Raven: Tags Context ', data);
          } else {
            $window.Raven.setTagsContext(data);
          }
        },
        context: function context(options, func, args) {
          var RavenService = this;

          if (angular.isFunction(options)) {
            args = func || [];
            func = options;
            options = undefined;
          }

          return RavenService.wrap(options, func).apply(RavenService, args);
        },
        wrap: function wrap(options, func) {
          var RavenService = this;

          if (angular.isUndefined(func) && !angular.isFunction(options)) {
            return options;
          }

          if (angular.isFunction(options)) {
            func = options;
            options = undefined;
          }

          if (!angular.isFunction(func)) {
            return func;
          }

          if (func.__raven__) {
            return func;
          }

          function Wrapped() {
            var args = [], i = arguments.length;
            while(i--) {
              args[i] = RavenService.wrap(options, arguments[i]);
            }
            try {
              return func.apply(this, args);
            } catch(e) {
              RavenService.captureException(e, options);
            }
          }

          for (var property in func) {
            if (func.hasOwnProperty(property)) {
              Wrapped[property] = func[property];
            }
          }
          Wrapped.__raven__ = true;
          return Wrapped;
        }

      };

      return service;
    }]; // end $get
  } // end provider

  function $ExceptionHandlerProvider($provide) {
    $provide.decorator('$exceptionHandler', [
      '$delegate', '$raven', '$injector',
      $ExceptionHandlerDecorator
    ]);
  }

{'fraction_non_alphanumeric': 0.12320706141963958, 'fraction_numerical': 0.0, 'mean_word_length': 1.596435391470401, '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': '1627180', 'n_tokens_mistral': 2212, 'n_tokens_neox': 2147, 'n_words': 424}