<commit_before>package org.andidev.webdriverextension;

import java.util.List;
import org.apache.commons.lang3.math.NumberUtils;

import org.openqa.selenium.WebElement;

public class HamcrestHelpers {

    public static String tagNameOf(WebElement webElement) {
        return webElement.getTagName();
    }

    public static String idIn(WebElement webElement) {
        return webElement.getAttribute("id");
    }

    public static String nameIn(WebElement webElement) {
        return webElement.getAttribute("name");
    }

    public static String classIn(WebElement webElement) {
        return webElement.getAttribute("class");
    }

    public static String valueIn(WebElement webElement) {
        return webElement.getAttribute("vale");
    }

    public static String hrefIn(WebElement webElement) {
        return webElement.getAttribute("href");
    }

    public static String textIn(WebElement webElement) {
        return webElement.getText();
    }

    public static Double numberIn(WebElement webElement) {
        return NumberUtils.createDouble(webElement.getText());
    }

    public static int numberOf(List<WebElement> webElements) {
        return webElements.size();
    }

    public static String url() {
        return ThreadDriver.getDriver().getCurrentUrl();
    }
}<commit_msg>Now returning null on thrown exception in HamcrestHelpers<commit_after>package org.andidev.webdriverextension;

import java.util.List;
import org.apache.commons.lang3.math.NumberUtils;

import org.openqa.selenium.WebElement;

public class HamcrestHelpers {

    public static String tagNameOf(WebElement webElement) {
        try {
            return webElement.getTagName();
        } catch (Exception e) {
            return null;
        }
    }

    public static String idIn(WebElement webElement) {
        try {
            return webElement.getAttribute("id");
        } catch (Exception e) {
            return null;
        }
    }

    public static String nameIn(WebElement webElement) {
        try {
            return webElement.getAttribute("name");
        } catch (Exception e) {
            return null;
        }
    }

    public static String classIn(WebElement webElement) {
        try {
            return webElement.getAttribute("class");
        } catch (Exception e) {
            return null;
        }
    }

    public static String valueIn(WebElement webElement) {
        try {
            return webElement.getAttribute("vale");
        } catch (Exception e) {
            return null;
        }
    }

    public static String hrefIn(WebElement webElement) {
        try {
            return webElement.getAttribute("href");
        } catch (Exception e) {
            return null;
        }
    }

    public static String textIn(WebElement webElement) {
        try {
            return webElement.getText();
        } catch (Exception e) {
            return null;
        }
    }

    public static Double numberIn(WebElement webElement) {
        try {
            return NumberUtils.createDouble(webElement.getText());
        } catch (Exception e) {
            return null;
        }
    }

    public static int numberOf(List<WebElement> webElements) {
        try {
            return webElements.size();
        } catch (Exception e) {
            return null;
        }
    }

    public static String url() {
        try {
            return ThreadDriver.getDriver().getCurrentUrl();
        } catch (Exception e) {
            return null;
        }
    }
}
{'fraction_non_alphanumeric': 0.08754974417282547, 'fraction_numerical': 0.0005685048322910744, 'mean_word_length': 2.1875, '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': '2496731', 'n_tokens_mistral': 923, 'n_tokens_neox': 920, 'n_words': 227}