<commit_before>package com.autonomy.abc.selenium.search;

import com.autonomy.abc.selenium.actions.ActionFactory;
import com.autonomy.abc.selenium.config.Application;
import com.autonomy.abc.selenium.page.ElementFactory;

public class SearchActionFactory extends ActionFactory {
    public SearchActionFactory(Application application, ElementFactory elementFactory) {
        super(application, elementFactory);
    }

    public Search makeSearch(String searchTerm) {
        return new Search(getApplication().createAppBody(getDriver()), getElementFactory(), searchTerm);
    }
}
<commit_msg>Refactor SearchActionFactory to use a single AppBody (otherwise cannot makeSearch when on Find)<commit_after>package com.autonomy.abc.selenium.search;

import com.autonomy.abc.selenium.actions.ActionFactory;
import com.autonomy.abc.selenium.config.Application;
import com.autonomy.abc.selenium.page.AppBody;
import com.autonomy.abc.selenium.page.ElementFactory;

public class SearchActionFactory extends ActionFactory {
    // TODO: does this go stale?
    private AppBody body;

    public SearchActionFactory(Application application, ElementFactory elementFactory) {
        super(application, elementFactory);
        body = application.createAppBody(getDriver());
    }

    public Search makeSearch(String searchTerm) {
        return new Search(body, getElementFactory(), searchTerm);
    }
}

{'fraction_non_alphanumeric': 0.0882986360373295, 'fraction_numerical': 0.0, 'mean_word_length': 5.034632034632034, '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': '4635787', 'n_tokens_mistral': 377, 'n_tokens_neox': 361, 'n_words': 83}