<commit_before>package nl.hsac.fitnesse.fixture.util.selenium.by;

import org.openqa.selenium.By;

/**
 * Container for generic heuristics to find elements.
 */
public class ElementBy {
    public static By heuristic(String place) {
        return new Heuristic(place);
    }

    public static By exact(String place) {
        return new Exact(place);
    }

    public static By partial(String place) {
        return new Partial(place);
    }

    /**
     * Finds using heuristic.
     */
    public static class Heuristic extends AbstractHeuristicBy {
        public Heuristic(String place) {
            super(exact(place), partial(place));
        }
    }

    /**
     * Finds by exact link text.
     */
    public static class Exact extends AbstractHeuristicBy {
        public Exact(String place) {
            super(LabelBy.exact(place),
                    PlaceholderBy.exact(place),
                    InputBy.exactValue(place),
                    new XPathBy(".//th/descendant-or-self::text()[normalized(.)='%s']/ancestor-or-self::th[1]/../td", place),
                    new XPathBy(".//dt/descendant-or-self::text()[normalized(.)='%s']/ancestor-or-self::dt[1]/following-sibling::dd[1]", place),
                    AriaLabelBy.exact(place),
                    new CssBy("[title='%s']", place));
        }
    }

    /**
     * Finds by partial link text.
     */
    public static class Partial extends AbstractHeuristicBy {
        public Partial(String place) {
            super(LabelBy.partial(place),
                    PlaceholderBy.partial(place),
                    InputBy.partialValue(place),
                    new XPathBy(".//th/descendant-or-self::text()[contains(normalized(.), '%s')]/ancestor-or-self::th[1]/../td", place),
                    new XPathBy(".//dt/descendant-or-self::text()[contains(normalized(.), '%s')]/ancestor-or-self::dt[1]/following-sibling::dd[1]", place),
                    AriaLabelBy.partial(place),
                    new CssBy("[title*='%s']", place));
        }
    }
}<commit_msg>Fix JavaDoc<commit_after>package nl.hsac.fitnesse.fixture.util.selenium.by;

import org.openqa.selenium.By;

/**
 * Container for generic heuristics to find elements.
 */
public class ElementBy {
    public static By heuristic(String place) {
        return new Heuristic(place);
    }

    public static By exact(String place) {
        return new Exact(place);
    }

    public static By partial(String place) {
        return new Partial(place);
    }

    /**
     * Finds using heuristic.
     */
    public static class Heuristic extends AbstractHeuristicBy {
        public Heuristic(String place) {
            super(exact(place), partial(place));
        }
    }

    /**
     * Finds elements exactly matching supplied place.
     */
    public static class Exact extends AbstractHeuristicBy {
        public Exact(String place) {
            super(LabelBy.exact(place),
                    PlaceholderBy.exact(place),
                    InputBy.exactValue(place),
                    new XPathBy(".//th/descendant-or-self::text()[normalized(.)='%s']/ancestor-or-self::th[1]/../td", place),
                    new XPathBy(".//dt/descendant-or-self::text()[normalized(.)='%s']/ancestor-or-self::dt[1]/following-sibling::dd[1]", place),
                    AriaLabelBy.exact(place),
                    new CssBy("[title='%s']", place));
        }
    }

    /**
     * Finds elements also showing supplied place.
     */
    public static class Partial extends AbstractHeuristicBy {
        public Partial(String place) {
            super(LabelBy.partial(place),
                    PlaceholderBy.partial(place),
                    InputBy.partialValue(place),
                    new XPathBy(".//th/descendant-or-self::text()[contains(normalized(.), '%s')]/ancestor-or-self::th[1]/../td", place),
                    new XPathBy(".//dt/descendant-or-self::text()[contains(normalized(.), '%s')]/ancestor-or-self::dt[1]/following-sibling::dd[1]", place),
                    AriaLabelBy.partial(place),
                    new CssBy("[title*='%s']", place));
        }
    }
}
{'fraction_non_alphanumeric': 0.14678899082568808, 'fraction_numerical': 0.0028971511347175277, 'mean_word_length': 2.096412556053812, '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': '4628363', 'n_tokens_mistral': 1249, 'n_tokens_neox': 1185, 'n_words': 219}