<commit_before>package operators;

import operators.base.Operator;
import org.openqa.selenium.Dimension;
import org.openqa.selenium.firefox.FirefoxDriver;
import util.Credentials;

import java.util.concurrent.TimeUnit;

/**
 * Created by eunderhi on 09/09/15.
 */
public class SetUpOperator extends Operator {

    private Credentials creds = new Credentials();
    private static final int LOAD_WAIT_TIME = 10;

    public void setUp() {
        driver = new FirefoxDriver();
        driver.manage().timeouts().implicitlyWait(LOAD_WAIT_TIME, TimeUnit.SECONDS);
        loginOrGoToBaseURL();
    }

    private void loginOrGoToBaseURL() {
        if(creds.hasLoginURL()) {
            String username = creds.getUsername();
            String password = creds.getPassword();
            String loginUrl = creds.getLoginURL();
            new LoginOperator().login(loginUrl, username, password);
        }
        else {<commit_msg>Browser window maximize<commit_after>package operators;

import operators.base.Operator;
import org.openqa.selenium.Dimension;
import org.openqa.selenium.firefox.FirefoxDriver;
import util.Credentials;

import java.util.concurrent.TimeUnit;

/**
 * Created by eunderhi on 09/09/15.
 */
public class SetUpOperator extends Operator {

    private Credentials creds = new Credentials();
    private static final int LOAD_WAIT_TIME = 10;

    public void setUp() {
        driver = new FirefoxDriver();
        driver.manage().timeouts().implicitlyWait(LOAD_WAIT_TIME, TimeUnit.SECONDS);
        driver.manage().window().maximize();
        loginOrGoToBaseURL();
    }

    private void loginOrGoToBaseURL() {
        if(creds.hasLoginURL()) {
            String username = creds.getUsername();
            String password = creds.getPassword();
            String loginUrl = creds.getLoginURL();
            new LoginOperator().login(loginUrl, username, password);
        }
        else {
{'fraction_non_alphanumeric': 0.10432968179447052, 'fraction_numerical': 0.008346374543557642, 'mean_word_length': 3.107066381156317, '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': '5515211', 'n_tokens_mistral': 565, 'n_tokens_neox': 534, 'n_words': 123}