<commit_before>package com.kahyalar.android.Uni2Guess;

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

/**
 * Created by kahyalar on 10/01/2017.
 */

public class LoginActivity extends AppCompatActivity {
    private EditText txtMail, txtPassword;
    private Button btnSignup, btnLogin;

    private void initElements(){
        txtMail = (EditText)findViewById(R.id.txtMail);
        txtPassword = (EditText)findViewById(R.id.txtPassword);
        btnLogin = (Button)findViewById(R.id.btnLogin);
        btnSignup = (Button)findViewById(R.id.btnSignup);
    }

    private void initEvents(){
        btnSignup_Click();
        btnLogin_Click();
    }

    private void btnSignup_Click(){
        btnSignup.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent signupIntent = new Intent(LoginActivity.this, SignupActivity.class);
                startActivity(signupIntent);
            }
        });
    }

    private void btnLogin_Click(){
        btnLogin.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                String test = txtMail.getText().toString();
                if(!test.contains("edu.tr")){
                    Toast.makeText(LoginActivity.this, R.string.btnLogin_ClickError, Toast.LENGTH_LONG).show();
                }
            }
        });
    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_login);
        initElements();
        initEvents();
    }
}<commit_msg>refactored btnLogin_Click() in Login Activity<commit_after>package com.kahyalar.android.Uni2Guess;

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

/**
 * Created by kahyalar on 10/01/2017.
 */

public class LoginActivity extends AppCompatActivity {
    private EditText txtMail, txtPassword;
    private Button btnSignup, btnLogin;

    private void initElements(){
        txtMail = (EditText)findViewById(R.id.txtMail);
        txtPassword = (EditText)findViewById(R.id.txtPassword);
        btnLogin = (Button)findViewById(R.id.btnLogin);
        btnSignup = (Button)findViewById(R.id.btnSignup);
    }

    private void initEvents(){
        btnSignup_Click();
        btnLogin_Click();
    }

    private void btnSignup_Click(){
        btnSignup.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent signupIntent = new Intent(LoginActivity.this, SignupActivity.class);
                startActivity(signupIntent);
            }
        });
    }

    private void checkEduTr(){
        String test = txtMail.getText().toString();
        if(!test.contains("edu.tr")){
            Toast.makeText(LoginActivity.this, R.string.btnLogin_ClickError, Toast.LENGTH_LONG).show();
        }
    }

    private void btnLogin_Click(){
        btnLogin.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                checkEduTr();
            }
        });
    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_login);
        initElements();
        initEvents();
    }
}
{'fraction_non_alphanumeric': 0.10386473429951691, 'fraction_numerical': 0.005367686527106817, 'mean_word_length': 2.6149369544131913, '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': '5938835', 'n_tokens_mistral': 1058, 'n_tokens_neox': 1002, 'n_words': 192}