<commit_before>package com.example.myfirstapp;

import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.EditText;
import android.widget.Toast;

public class MainActivity extends AppCompatActivity {

    EditText charEditText, asciiEditText;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        charEditText = (EditText) findViewById(R.id.charEditText);
        asciiEditText = (EditText) findViewById(R.id.asciiEditText);
    }

    /** Called when the user taps the Send button */
    public void sendMessage(View view) {
        Intent intent = new Intent(this, DisplayMessageActivity.class);
        Bundle bundle = new Bundle();
        String myChar = charEditText.getText().toString();
        String myAscii = asciiEditText.getText().toString();
        bundle.putString("CHAR", myChar);
        bundle.putString("ASCII", myAscii);
        intent.putExtras(bundle);
        startActivity(intent);
    }

    public void convertToAscii(View view) {
        if (charEditText.getText().toString().length() > 0) {
            char ch = charEditText.getText().toString().charAt(0);
            int ascii = (int) ch;
            asciiEditText.setText(Integer.toString(ascii));
            asciiEditText.clearFocus();
        } else {
            Toast.makeText(this, R.string.empty_char, Toast.LENGTH_SHORT).show();
        }
    }

    public void convertToChar(View view) {
        if (asciiEditText.getText().toString().length() > 0) {
            int ascii = Integer.parseInt(asciiEditText.getText().toString());
            char ch = (char) ascii;
            charEditText.setText(Character.toString(ch));
            charEditText.clearFocus();
        } else {
            Toast.makeText(this, R.string.empty_ascii, Toast.LENGTH_SHORT).show();
        }
    }
}<commit_msg>Added auto focus and select<commit_after>package com.example.myfirstapp;

import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.EditText;
import android.widget.Toast;

public class MainActivity extends AppCompatActivity {

    EditText charEditText, asciiEditText;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        charEditText = (EditText) findViewById(R.id.charEditText);
        asciiEditText = (EditText) findViewById(R.id.asciiEditText);
    }

    /** Called when the user taps the Send button */
    public void sendMessage(View view) {
        Intent intent = new Intent(this, DisplayMessageActivity.class);
        Bundle bundle = new Bundle();
        String myChar = charEditText.getText().toString();
        String myAscii = asciiEditText.getText().toString();
        bundle.putString("CHAR", myChar);
        bundle.putString("ASCII", myAscii);
        intent.putExtras(bundle);
        startActivity(intent);
    }

    public void convertToAscii(View view) {
        if (charEditText.getText().toString().length() > 0) {
            char ch = charEditText.getText().toString().charAt(0);
            int ascii = (int) ch;
            asciiEditText.setText(Integer.toString(ascii));
            asciiEditText.requestFocus();
            asciiEditText.selectAll();
        } else {
            Toast.makeText(this, R.string.empty_char, Toast.LENGTH_SHORT).show();
        }
    }

    public void convertToChar(View view) {
        if (asciiEditText.getText().toString().length() > 0) {
            int ascii = Integer.parseInt(asciiEditText.getText().toString());
            char ch = (char) ascii;
            charEditText.setText(Character.toString(ch));
            charEditText.requestFocus();
            charEditText.selectAll();
        } else {
            Toast.makeText(this, R.string.empty_ascii, Toast.LENGTH_SHORT).show();
        }
    }
}
{'fraction_non_alphanumeric': 0.11537521388413591, 'fraction_numerical': 0.001955512099731117, 'mean_word_length': 2.8422535211267608, 'pattern_counts': {'":': 0, '<': 3, '<?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': '4151084', 'n_tokens_mistral': 1193, 'n_tokens_neox': 1113, 'n_words': 222}