<commit_before>"use strict";
var serviceLib = {};


var config = {
  app_id: "you_app_id",
  app_secret: "you_app_id",
};

var connectFunctions = {
  // IN :
  //   * callback url to ping after grant
  // OUT :
  //   * err
  //   * url to redirect to
  //   * data to store (if any)
  redirectToService: function redirectToService(callbackUrl, next) {
    serviceLib.generateRedirectUrl(function(err, redirectUrl) {
      redirectUrl += "&callback=" + encodeURI(callbackUrl);
      next(null, redirectUrl, {
        token: '<PASSWORD>'
      });
    });
  },

  // IN :
  //   * GET params from the incoming request,
  //   * Params returned by previous function
  // OUT :
  //   * err
  //   * service data to permanently store
  retrieveTokens: function retrieveTokens(reqParams, storedParams, next) {
    serviceLib.generateAccessToken(reqParams.code, function(err, accessToken) {
      next(null, {
        accessToken: accessToken,
        account: storedParams.account
      });
    });
  }
};

// IN :
//   * serviceData returned by retrieveTokens
//   * last cursor returned by this function, or null
//   * Queues to use
// OUT :
//   * err
//   * new cursor
//   * new serviceData to replace previous ones (if any)
var updateAccount = function updateAccount(serviceData, cursor, queues, next) {
  serviceLib.retrieveDelta(cursor, function(err, createdFiles, deletedFiles) {
    createdFiles.forEach(function(task) {
      queues.additions.push(task);
    });

    deletedFiles.forEach(function(task) {
      queues.deletions.push(task);
    });

    next();
  });
};

// IN :
//   * task to process
//   * pre-configured anyfetchClient
//   * serviceData returned by retrieveTokens
// OUT :
//   * err
var workers = {
  'additions': function(task, anyfetchClient, serviceData, next) {
    anyfetchClient.sendDocument(task, next);
  },
  'deletions': function(task, anyfetchClient, serviceData, next) {
    anyfetchClient.deleteDocument(task, next);
  }
};

<commit_msg>Fake requirements<commit_after>"use strict";
// Lib to interact with external services
var serviceLib = require('some-lib-for-my-service');

var AnyFetchProvider = require('anyfetch-provider');


var config = {
  // Anyfetch app id
  app_id: "you_app_id",

  // Anyfetch app secret
  app_secret: "you_app_id",
};

var connectFunctions = {
  // IN :
  //   * callback url to ping after grant
  // OUT :
  //   * err
  //   * url to redirect to
  //   * data to store (if any)
  redirectToService: function redirectToService(callbackUrl, cb) {
    serviceLib.generateRedirectUrl(function(err, redirectUrl) {
      redirectUrl += "&callback=" + encodeURI(callbackUrl);
      cb(null, redirectUrl, {
        token: '<PASSWORD>'
      });
    });
  },

  // IN :
  //   * GET params from the incoming request,
  //   * Params returned by previous function
  // OUT :
  //   * err
  //   * service data to permanently store
  retrieveTokens: function retrieveTokens(reqParams, storedParams, cb) {
    serviceLib.generateAccessToken(reqParams.code, function(err, accessToken) {
      cb(null, {
        accessToken: accessToken,
        account: storedParams.account
      });
    });
  }
};

// IN :
//   * serviceData returned by retrieveTokens
//   * last cursor returned by this function, or null
//   * Queues to use
// OUT :
//   * err
//   * new cursor
//   * new serviceData to replace previous ones (if any)
var updateAccount = function updateAccount(serviceData, cursor, queues, cb) {
  serviceLib.retrieveDelta(cursor, function(err, createdFiles, deletedFiles) {
    createdFiles.forEach(function(task) {
      queues.additions.push(task);
    });

    deletedFiles.forEach(function(task) {
      queues.deletions.push(task);
    });

    cb();
  });
};

// IN :
//   * task to process
//   * pre-configured anyfetchClient
//   * serviceData returned by retrieveTokens
// OUT :
//   * err
var workers = {
  'additions': function(task, anyfetchClient, serviceData, cb) {
    anyfetchClient.sendDocument(task, cb);
  },
  'deletions': function(task, anyfetchClient, serviceData, cb) {
    anyfetchClient.deleteDocument(task, cb);
  }
};

// Set concurrency. Defaults to 5
workers.additions.concurrency = 5;


{'fraction_non_alphanumeric': 0.13075638272488666, 'fraction_numerical': 0.0004772130756382725, 'mean_word_length': 2.936150234741784, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '7067996', 'n_tokens_mistral': 1288, 'n_tokens_neox': 1285, 'n_words': 318}