<commit_before>package com.supinfo.jva.geocar;

import android.content.Intent;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.preference.PreferenceManager;
import android.support.v7.app.ActionBarActivity;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.Toast;

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

import com.supinfo.jva.geocar.tools.APIRequest;

public class Login extends ActionBarActivity {

    private EditText usernameField = null;
    private EditText passwordField = null;
    private Button sendDataButton = null;
    private final Login context = this;

    private APIRequest requestStuff = new APIRequest();

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(context);
        // If we couln't get the informations, we return an empty string.
        String username = preferences.getString("username", "");
        String password = preferences.getString("password", "");

        if(username.equals("") && password.equals("")) {
            setContentView(R.layout.login);

            usernameField = (EditText) findViewById(R.id.username);
            passwordField = (EditText) findViewById(R.id.password);
            sendDataButton = (Button) findViewById(R.id.sendButton);
<commit_msg>Set local var instead of global<commit_after>package com.supinfo.jva.geocar;

import android.content.Intent;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.preference.PreferenceManager;
import android.support.v7.app.ActionBarActivity;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.Toast;

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

import com.supinfo.jva.geocar.tools.APIRequest;

public class Login extends ActionBarActivity {

    private EditText usernameField = null;
    private EditText passwordField = null;
    private final Login context = this;

    private APIRequest requestStuff = new APIRequest();

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(context);
        // If we couln't get the informations, we return an empty string.
        String username = preferences.getString("username", "");
        String password = preferences.getString("password", "");

        if(username.equals("") && password.equals("")) {
            setContentView(R.layout.login);

            usernameField = (EditText) findViewById(R.id.username);
            passwordField = (EditText) findViewById(R.id.password);
            Button sendDataButton = (Button) findViewById(R.id.sendButton);

{'fraction_non_alphanumeric': 0.09663150731541341, 'fraction_numerical': 0.0006805035726437564, 'mean_word_length': 4.051546391752577, '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': '5894838', 'n_tokens_mistral': 771, 'n_tokens_neox': 744, 'n_words': 184}