<commit_before>package li.doerf.hacked;


import org.junit.Rule;
import org.junit.Test;
import org.junit.runner.RunWith;

import androidx.test.espresso.NoMatchingViewException;
import androidx.test.filters.LargeTest;
import androidx.test.rule.ActivityTestRule;
import androidx.test.runner.AndroidJUnit4;
import li.doerf.hacked.activities.MainActivity;

import static androidx.test.espresso.Espresso.onView;
import static androidx.test.espresso.action.ViewActions.click;
import static androidx.test.espresso.action.ViewActions.longClick;
import static androidx.test.espresso.action.ViewActions.typeText;
import static androidx.test.espresso.assertion.ViewAssertions.matches;
import static androidx.test.espresso.matcher.ViewMatchers.isDisplayed;
import static androidx.test.espresso.matcher.ViewMatchers.withId;
import static androidx.test.espresso.matcher.ViewMatchers.withText;
import static org.hamcrest.CoreMatchers.containsString;
import static org.hamcrest.CoreMatchers.not;


@RunWith(AndroidJUnit4.class)
@LargeTest
public class SmokeTest {

    static final String ACCOUNT_NAME = "aaa";
    @Rule
    public ActivityTestRule<MainActivity> mActivityRule =
            new ActivityTestRule<>(MainActivity.class);

    @Test
    public void addAccountAaaWithLeaks() {
        removeAccountIfExists();

        onView(withId(R.id.action_add_account)).perform(click());
        onView(withId(R.id.account)).perform(typeText(ACCOUNT_NAME));
        onView(withText("Add")).perform(click());
        try {
            Thread.sleep(10000);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        onView(withId(R.id.last_checked)).check(matches(not(withText("yyyy/mm/dd hh:mm"))));
        onView(withId(R.id.last_checked)).check(matches(not(withText("-"))));
        onView(withId(R.id.breach_state)).check(matches(withText(containsString("breaches"))));
    }

    private void removeAccountIfExists() {
        try {
            onView(withText(ACCOUNT_NAME)).check(matches(isDisplayed()));
            onView(withText(ACCOUNT_NAME)).perform(longClick());
            onView(withText("OK")).perform(click());<commit_msg>run smoke test in ci<commit_after>package li.doerf.hacked;


import org.junit.Rule;
import org.junit.Test;
import org.junit.runner.RunWith;

import androidx.test.espresso.NoMatchingViewException;
import androidx.test.filters.LargeTest;
import androidx.test.rule.ActivityTestRule;
import androidx.test.runner.AndroidJUnit4;
import li.doerf.hacked.activities.MainActivity;

import static androidx.test.espresso.Espresso.onView;
import static androidx.test.espresso.action.ViewActions.click;
import static androidx.test.espresso.action.ViewActions.longClick;
import static androidx.test.espresso.action.ViewActions.typeText;
import static androidx.test.espresso.assertion.ViewAssertions.matches;
import static androidx.test.espresso.matcher.ViewMatchers.isDisplayed;
import static androidx.test.espresso.matcher.ViewMatchers.withId;
import static androidx.test.espresso.matcher.ViewMatchers.withText;
import static org.hamcrest.CoreMatchers.containsString;
import static org.hamcrest.CoreMatchers.not;


@RunWith(AndroidJUnit4.class)
@LargeTest
public class SmokeTest {

    static final String ACCOUNT_NAME = "aaa";
    @Rule
    public ActivityTestRule<MainActivity> mActivityRule =
            new ActivityTestRule<>(MainActivity.class);

    @Test
    public void addAccountAaaWithLeaks() {
        removeAccountIfExists();

        onView(withId(R.id.action_add_account)).perform(click());
        onView(withId(R.id.account)).perform(typeText(ACCOUNT_NAME));
        onView(withText("Add")).perform(click());
        try {
            Thread.sleep(20000);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        onView(withId(R.id.last_checked)).check(matches(not(withText("yyyy/mm/dd hh:mm"))));
        onView(withId(R.id.last_checked)).check(matches(not(withText("-"))));
        onView(withId(R.id.breach_state)).check(matches(withText(containsString("breaches"))));
    }

    private void removeAccountIfExists() {
        try {
            onView(withText(ACCOUNT_NAME)).check(matches(isDisplayed()));
            onView(withText(ACCOUNT_NAME)).perform(longClick());
            onView(withText("OK")).perform(click());
{'fraction_non_alphanumeric': 0.12294892535243818, 'fraction_numerical': 0.0032354980355904783, 'mean_word_length': 4.471554993678888, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '5273152', 'n_tokens_mistral': 1363, 'n_tokens_neox': 1347, 'n_words': 181}