<commit_before>package com.humbughq.mobile.test;

import org.json.JSONException;
import org.json.JSONObject;

import com.humbughq.mobile.HumbugActivity;
import com.humbughq.mobile.Message;
import com.humbughq.mobile.Person;
import com.humbughq.mobile.ZulipApp;

import android.content.Intent;
import android.test.ActivityUnitTestCase;

public class UnsortedTests extends ActivityUnitTestCase<HumbugActivity> {

    private ZulipApp app;

    public UnsortedTests() {
        super(HumbugActivity.class);
    }

    protected void setUp() throws Exception {
        super.setUp();
        app = new ZulipApp();
    }
    
    public void testMessageCreation() throws JSONException {
        testInit();
        JSONObject jsonObject;
        jsonObject = new JSONObject("{\"recipient_id\": 314, \"sender_email\": \"<EMAIL>\", \"timestamp\": 1379966441, \"display_recipient\": \"test\", \"sender_id\": 15, \"sender_full_name\": \"<NAME>\", \"sender_domain\": \"zulip.com\", \"content\": \"Hello!\", \"gravatar_hash\": \"9cd8e1981dc89f3221c5077dd8a22515\", \"avatar_url\": \"https://secure.gravatar.com/avatar/9cd8e1981dc89f3221c5077dd8a22515?d=identicon\", \"client\": \"website\", \"content_type\": \"text/x-markdown\", \"subject_links\": [], \"sender_short_name\": \"lfaraone\", \"type\": \"stream\", \"id\": 10594623, \"subject\": \"toast\"}");
        Message msg = new Message((ZulipApp) getActivity().getApplication(), jsonObject);
        assertEquals(msg.getID(), 10594623);
        assertEquals(msg.getSender(), new Person("<NAME>", "<EMAIL>"));
    }

    /**
     * Run this before each test to set up the activity.
     */
    private void testInit() {
        setApplication(app);
        this.startActivity(new Intent(getInstrumentation().getTargetContext(), HumbugActivity.class), null, null);
        this.getInstrumentation().waitForIdleSync();
        app.setContext(getInstrumentation().getTargetContext());
        ((ZulipApp) getActivity().getApplication()).setEmail("<EMAIL>");
        
    }

    protected void tearDown() throws Exception {
        super.tearDown();
    }

}<commit_msg>Apply formatter to testcases<commit_after>package com.humbughq.mobile.test;

import org.json.JSONException;
import org.json.JSONObject;

import com.humbughq.mobile.HumbugActivity;
import com.humbughq.mobile.Message;
import com.humbughq.mobile.Person;
import com.humbughq.mobile.ZulipApp;

import android.content.Intent;
import android.test.ActivityUnitTestCase;

public class UnsortedTests extends ActivityUnitTestCase<HumbugActivity> {

    private ZulipApp app;

    public UnsortedTests() {
        super(HumbugActivity.class);
    }

    protected void setUp() throws Exception {
        super.setUp();
        app = new ZulipApp();
    }

    public void testMessageCreation() throws JSONException {
        testInit();
        JSONObject jsonObject;
        jsonObject = new JSONObject(
                "{\"recipient_id\": 314, \"sender_email\": \"<EMAIL>\", \"timestamp\": 1379966441, \"display_recipient\": \"test\", \"sender_id\": 15, \"sender_full_name\": \"<NAME>\", \"sender_domain\": \"zulip.com\", \"content\": \"Hello!\", \"gravatar_hash\": \"9cd8e1981dc89f3221c5077dd8a22515\", \"avatar_url\": \"https://secure.gravatar.com/avatar/9cd8e1981dc89f3221c5077dd8a22515?d=identicon\", \"client\": \"website\", \"content_type\": \"text/x-markdown\", \"subject_links\": [], \"sender_short_name\": \"lfaraone\", \"type\": \"stream\", \"id\": 10594623, \"subject\": \"toast\"}");
        Message msg = new Message((ZulipApp) getActivity().getApplication(),
                jsonObject);
        assertEquals(msg.getID(), 10594623);
        assertEquals(msg.getSender(), new Person("<NAME>",
                "<EMAIL>"));
    }

    /**
     * Run this before each test to set up the activity.
     */
    private void testInit() {
        setApplication(app);
        this.startActivity(new Intent(getInstrumentation().getTargetContext(),
                HumbugActivity.class), null, null);
        this.getInstrumentation().waitForIdleSync();
        app.setContext(getInstrumentation().getTargetContext());
        ((ZulipApp) getActivity().getApplication())
                .setEmail("<EMAIL>");

    }

    protected void tearDown() throws Exception {
        super.tearDown();
    }

}
{'fraction_non_alphanumeric': 0.16314199395770393, 'fraction_numerical': 0.03485940041831281, 'mean_word_length': 3.4188911704312117, 'pattern_counts': {'":': 34, '<': 15, '<?xml version=': 0, '>': 15, 'https://': 2, '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': '3866536', 'n_tokens_mistral': 1409, 'n_tokens_neox': 1293, 'n_words': 249}