<commit_before>'use strict';

angular.module('stPagination').service("Pagination", function () {

  function Pagination(inputCollection) {
    this.$inputCollection = inputCollection;
    this.$limit = 10;
    this.$page = 0;
  }

  angular.extend(Pagination.prototype, {
    setInputCollection: function (inputCollection) {
      this.$inputCollection = inputCollection;
    },
    paginatedInputCollection: function () {
      var start = this.offset();
      var stop = this.offset() + this.limit();
      return this.$inputCollection.slice(start, stop);
    },
    inputCollection: function () {
      return this.$inputCollection
    },
    length: function () {
      return this.$inputCollection.length;
    },
    setLimit: function (limit) {
      this.$limit = limit;
    },
    totalPages: function () {
      return Math.ceil(this.$inputCollection.length / this.limit()) || 1;
    },<commit_msg>Start and stop method for Pagination.<commit_after>'use strict';

angular.module('stPagination').service("Pagination", function () {

  function Pagination(inputCollection) {
    this.$inputCollection = inputCollection;
    this.$limit = 10;
    this.$page = 0;
  }

  angular.extend(Pagination.prototype, {
    setInputCollection: function (inputCollection) {
      this.$inputCollection = inputCollection;
    },
    paginatedInputCollection: function () {
      return this.$inputCollection.slice(this.start(), this.stop());
    },
    inputCollection: function () {
      return this.$inputCollection
    },
    start: function () {
      return this.offset();
    },
    stop: function () {
      return this.offset() + this.limit();
    },
    length: function () {
      return this.$inputCollection.length;
    },
    setLimit: function (limit) {
      this.$limit = limit;
    },
    totalPages: function () {
      return Math.ceil(this.$inputCollection.length / this.limit()) || 1;
    },
{'fraction_non_alphanumeric': 0.1390346274921301, 'fraction_numerical': 0.004197271773347324, 'mean_word_length': 3.0835117773019274, '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': '912764', 'n_tokens_mistral': 534, 'n_tokens_neox': 524, 'n_words': 105}