<commit_before>'use strict';

module.config([
  '$provide', function ($provide) {
    var isCallable = function (fn) {
      angular.isFunction(fn);
    };

    $provide.decorator('$resource', [
      '$delegate', '$cacheFactory', function ($resource, $cacheFactory) {
        return function (url, params, actions, options) {
          if (!angular.isObject(options)) {
            options = {};
          }

          actions = angular.isObject(actions) ? actions : {};
          actions.get = actions.get || {method: 'GET'};
          actions.query = actions.query || {method: 'GET', isArray: true};

          if (options.cache && !options.cache.info) {
            options.cache = options.cache || '$http';
            options.cache = $cacheFactory.get(options.cache) || $cacheFactory(options.cache);
          }

          for (var prop in actions) {
            if (actions.hasOwnProperty(prop) && actions[prop].method.toUpperCase() === 'GET') {
              actions[prop].cache = options.cache;
            }
          }

          var resource = $resource.apply($resource, arguments);

          if (options.cache && options.cache.info) {
            resource.$cache = options.cache;
          }

          return resource;
        }
      }
    ]);
  }<commit_msg>Add missing semi in resourceDecorator<commit_after>'use strict';

module.config([
  '$provide', function ($provide) {
    var isCallable = function (fn) {
      angular.isFunction(fn);
    };

    $provide.decorator('$resource', [
      '$delegate', '$cacheFactory', function ($resource, $cacheFactory) {
        return function (url, params, actions, options) {
          if (!angular.isObject(options)) {
            options = {};
          }

          actions = angular.isObject(actions) ? actions : {};
          actions.get = actions.get || {method: 'GET'};
          actions.query = actions.query || {method: 'GET', isArray: true};

          if (options.cache && !options.cache.info) {
            options.cache = options.cache || '$http';
            options.cache = $cacheFactory.get(options.cache) || $cacheFactory(options.cache);
          }

          for (var prop in actions) {
            if (actions.hasOwnProperty(prop) && actions[prop].method.toUpperCase() === 'GET') {
              actions[prop].cache = options.cache;
            }
          }

          var resource = $resource.apply($resource, arguments);

          if (options.cache && options.cache.info) {
            resource.$cache = options.cache;
          }

          return resource;
        };
      }
    ]);
  }
{'fraction_non_alphanumeric': 0.14951456310679612, 'fraction_numerical': 0.0, 'mean_word_length': 2.0630202140309155, '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': '2753369', 'n_tokens_mistral': 706, 'n_tokens_neox': 686, 'n_words': 144}