<commit_before>// Stub webdriver to use with several test cases

/*
 * Copyright (c) 2012, Yahoo! Inc.  All rights reserved.
 * Copyrights licensed under the New BSD License.
 * See the accompanying LICENSE file for terms.
 */


var promise = {};
var Application = function () {
    this.callbacks = {};
};
promise.Application = Application;

var By = {
    id: function () {
    },
    name: function () {
    },
    css: function () {
    },
    xpath: function () {
    }
};

var WebDriver = function () {
    var self = this;
    this.By = By;
    this.Application = Application;

    this.sessionId = 101;
    this.session_ = {
        then: function (cb) {
            cb({id: self.sessionId, capabilities: {browserName: 'browser'}});
        }
    };

    this.currentUrl = "about:blank";
    this.scriptResults = [];
    this.actions = [];
};
var Builder = function () {
};

Application.getInstance = function () {
    return Application._instance;
};
Application.prototype.on = function (eventName, callback) {
    this.callbacks[eventName] = callback;
};
Application.prototype.notify = function (eventName, data) {
    if (this.callbacks[eventName]) {
        this.callbacks[eventName].call(this, data);
    }
};

Builder.prototype.usingServer = function () {
    return this;
};
Builder.prototype.usingSession = function (id) {
    this.sessionId = id;
    return this;
};
Builder.prototype.withCapabilities = function () {
    return this;
};
Builder.prototype.build = function () {
    return new WebDriver();
};

WebDriver.prototype.findElement = function () {
    var self = this;
    return {
        clear: function () {
        },
        sendKeys: function (value) {<commit_msg>fixing webdriver stub's Application object<commit_after>// Stub webdriver to use with several test cases

/*
 * Copyright (c) 2012, Yahoo! Inc.  All rights reserved.
 * Copyrights licensed under the New BSD License.
 * See the accompanying LICENSE file for terms.
 */


var promise = {};
var Application = function () {
    this.callbacks = {};
};
promise.Application = Application;

var By = {
    id: function () {
    },
    name: function () {
    },
    css: function () {
    },
    xpath: function () {
    }
};

var WebDriver = function () {
    var self = this;
    this.By = By;
    this.Application = Application;

    this.sessionId = 101;
    this.session_ = {
        then: function (cb) {
            cb({id: self.sessionId, capabilities: {browserName: 'browser'}});
        }
    };

    this.currentUrl = "about:blank";
    this.scriptResults = [];
    this.actions = [];
};
var Builder = function () {
};

Application.getInstance = function () {
    return new Application();
};
Application.prototype.on = function (eventName, callback) {
    this.callbacks[eventName] = callback;
};
Application.prototype.notify = function (eventName, data) {
    if (this.callbacks[eventName]) {
        this.callbacks[eventName].call(this, data);
    }
};

Builder.prototype.usingServer = function () {
    return this;
};
Builder.prototype.usingSession = function (id) {
    this.sessionId = id;
    return this;
};
Builder.prototype.withCapabilities = function () {
    return this;
};
Builder.prototype.build = function () {
    return new WebDriver();
};

WebDriver.prototype.findElement = function () {
    var self = this;
    return {
        clear: function () {
        },
        sendKeys: function (value) {
{'fraction_non_alphanumeric': 0.13805206200643463, 'fraction_numerical': 0.0040947645510383155, 'mean_word_length': 2.8297872340425534, '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': '4772148', 'n_tokens_mistral': 1016, 'n_tokens_neox': 992, 'n_words': 257}