<commit_before>var webdriver = require('selenium-webdriver');

var DEFAULT_BROWSER_ENV = 'chrome:32:Windows 8.1';

var sauce = {
  createNewDriver: function() {
    var caps = this._getCapabilities();
    var hubUrl = this._getHubUrl();

    var driver = new webdriver.Builder().
      withCapabilities(caps).
      usingServer(hubUrl).
      build();

    return driver;
  },

  _getCapabilities: function() {
    var testName = 'Blip (local)';
    var buildLabel;
    var tunnelIdentifier;
    var credentials = this._getCredentials();
    var browser = this._getBrowser();
    var tags = ['e2e', 'local'];

    var caps = new webdriver.Capabilities()
      .set('username', credentials.username)
      .set('accessKey', credentials.accessKey)
      .set(webdriver.Capability.BROWSER_NAME, browser[0])
      .set(webdriver.Capability.VERSION, browser[1])
      .set(webdriver.Capability.PLATFORM, browser[2]);

    if (process.env.TRAVIS) {
      testName = 'Blip';
      buildLabel = 'TRAVIS #' + process.env.TRAVIS_BUILD_NUMBER + ' (' + process.env.TRAVIS_BUILD_ID + ')';
      tunnelIdentifier = process.env.TRAVIS_JOB_NUMBER;
      tags[1] = 'ci';

      caps
        .set('tunnelIdentifier', tunnelIdentifier)
        .set('build', buildLabel);
    }

    caps
      .set('name', testName)
      .set('tags', tags);

    return caps;
  },

  _getCredentials: function() {
    var username = process.env.SAUCE_USERNAME;
    var accessKey = process.env.SAUCE_ACCESS_KEY;

    if (!(username && accessKey)) {
      throw new Error('Must set both SAUCE_USERNAME and SAUCE_ACCESS_KEY' +
                      ' env variables');
    }

    return {
      username: username,
      accessKey: accessKey
    };
  },

  _getBrowser: function() {
    var result;
    var browserEnv = process.env.BROWSER || DEFAULT_BROWSER_ENV;
    if (browserEnv) {
      result = browserEnv.split(':');
    }<commit_msg>Change saucelabs tunnel identifier spelling<commit_after>var webdriver = require('selenium-webdriver');

var DEFAULT_BROWSER_ENV = 'chrome:32:Windows 8.1';

var sauce = {
  createNewDriver: function() {
    var caps = this._getCapabilities();
    var hubUrl = this._getHubUrl();

    var driver = new webdriver.Builder().
      withCapabilities(caps).
      usingServer(hubUrl).
      build();

    return driver;
  },

  _getCapabilities: function() {
    var testName = 'Blip (local)';
    var buildLabel;
    var tunnelIdentifier;
    var credentials = this._getCredentials();
    var browser = this._getBrowser();
    var tags = ['e2e', 'local'];

    var caps = new webdriver.Capabilities()
      .set('username', credentials.username)
      .set('accessKey', credentials.accessKey)
      .set(webdriver.Capability.BROWSER_NAME, browser[0])
      .set(webdriver.Capability.VERSION, browser[1])
      .set(webdriver.Capability.PLATFORM, browser[2]);

    if (process.env.TRAVIS) {
      testName = 'Blip';
      buildLabel = 'TRAVIS #' + process.env.TRAVIS_BUILD_NUMBER + ' (' + process.env.TRAVIS_BUILD_ID + ')';
      tunnelIdentifier = process.env.TRAVIS_JOB_NUMBER;
      tags[1] = 'ci';

      caps
        .set('tunnel-identifier', tunnelIdentifier)
        .set('build', buildLabel);
    }

    caps
      .set('name', testName)
      .set('tags', tags);

    return caps;
  },

  _getCredentials: function() {
    var username = process.env.SAUCE_USERNAME;
    var accessKey = process.env.SAUCE_ACCESS_KEY;

    if (!(username && accessKey)) {
      throw new Error('Must set both SAUCE_USERNAME and SAUCE_ACCESS_KEY' +
                      ' env variables');
    }

    return {
      username: username,
      accessKey: accessKey
    };
  },

  _getBrowser: function() {
    var result;
    var browserEnv = process.env.BROWSER || DEFAULT_BROWSER_ENV;
    if (browserEnv) {
      result = browserEnv.split(':');
    }
{'fraction_non_alphanumeric': 0.1316818774445893, 'fraction_numerical': 0.00469361147327249, 'mean_word_length': 2.882591093117409, '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': '4294631', 'n_tokens_mistral': 1241, 'n_tokens_neox': 1205, 'n_words': 248}