<commit_before>"use strict";

const request = require("sync-request");
const availables = {};

const bsArray = JSON.parse(request("GET", "https://api.browserstack.com/4/browsers?flat=true", {
    headers: {
        authorization: "Basic " + Buffer.from(process.env.BROWSER_STACK_USERNAME + ":" + process.env.BROWSER_STACK_ACCESS_KEY).toString("base64")
    }
}).getBody());

bsArray.forEach(function(cap) {
    cap.base = "BrowserStack";
    if (cap.device) {
        // Mobile devices
        availables[`${cap.device} with ${cap.os} ${cap.os_version} (BrowserStack)`] = cap;
    } else {
        // Desktop browsers
        availables[`${cap.browser} ${cap.browser_version} on ${cap.os} ${cap.os_version} (BrowserStack)`] = cap;
    }
});

const slArray = JSON.parse(request("GET", "https://saucelabs.com/rest/v1.1/info/platforms/webdriver").getBody());

slArray.forEach(function(cap) {
    availables[`${cap.long_name} ${cap.long_version} on ${cap.os} (SauceLabs)`] = {
        browserName: cap.api_name,
        version: cap.long_version,
        platform: cap.os,
        base: "SauceLabs"
    };
});

function compareVersion(version1, version2) {
    const v1 = version1.split(".");<commit_msg>Using short browser version for saucelabs capabilities.<commit_after>"use strict";

const request = require("sync-request");
const availables = {};

const bsArray = JSON.parse(request("GET", "https://api.browserstack.com/4/browsers?flat=true", {
    headers: {
        authorization: "Basic " + Buffer.from(process.env.BROWSER_STACK_USERNAME + ":" + process.env.BROWSER_STACK_ACCESS_KEY).toString("base64")
    }
}).getBody());

bsArray.forEach(function(cap) {
    cap.base = "BrowserStack";
    if (cap.device) {
        // Mobile devices
        availables[`${cap.device} with ${cap.os} ${cap.os_version} (BrowserStack)`] = cap;
    } else {
        // Desktop browsers
        availables[`${cap.browser} ${cap.browser_version} on ${cap.os} ${cap.os_version} (BrowserStack)`] = cap;
    }
});

const slArray = JSON.parse(request("GET", "https://saucelabs.com/rest/v1/info/platforms/webdriver").getBody());

slArray.forEach(function(cap) {
    availables[`${cap.long_name} ${cap.long_version} on ${cap.os} (SauceLabs)`] = {
        browserName: cap.api_name,
        version: cap.short_version,
        platform: cap.os,
        base: "SauceLabs"
    };
});

function compareVersion(version1, version2) {
    const v1 = version1.split(".");
{'fraction_non_alphanumeric': 0.17615731257681277, 'fraction_numerical': 0.006964358869315854, 'mean_word_length': 3.6871401151631478, 'pattern_counts': {'":': 2, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 4, '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': '2095686', 'n_tokens_mistral': 849, 'n_tokens_neox': 835, 'n_words': 133}