<commit_before>package edu.pdx.oss.sqliteloginapp;

import android.content.Context;
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;

// update user

public class UpdateActivity extends AppCompatActivity {
    Bundle b;
    String user_name, user_pass, new_user_name;
    EditText USER_NAME_TEXT;
    Button UPDATE_BUTTON;
    DatabaseOperations dop;
    Context ctx = this;

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

        USER_NAME_TEXT = (EditText) findViewById(R.id.usernameText);
        UPDATE_BUTTON = (Button) findViewById(R.id.updateButton);

        b = getIntent().getExtras();
        user_name = b.getString("user_name");
        user_pass = b.getString("user_password");

        UPDATE_BUTTON.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                new_user_name = USER_NAME_TEXT.getText().toString();
                dop = new DatabaseOperations(ctx);
                dop.updateUser(dop, user_name, user_pass, new_user_name);
                Toast.makeText(getBaseContext(),"Update success", Toast.LENGTH_LONG).show();
                finish();
            }
        });

    }


}
<commit_msg>Deleted comment<commit_after>package edu.pdx.oss.sqliteloginapp;

import android.content.Context;
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;

public class UpdateActivity extends AppCompatActivity {
    Bundle b;
    String user_name, user_pass, new_user_name;
    EditText USER_NAME_TEXT;
    Button UPDATE_BUTTON;
    DatabaseOperations dop;
    Context ctx = this;

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

        USER_NAME_TEXT = (EditText) findViewById(R.id.usernameText);
        UPDATE_BUTTON = (Button) findViewById(R.id.updateButton);

        b = getIntent().getExtras();
        user_name = b.getString("user_name");
        user_pass = b.getString("user_password");

        UPDATE_BUTTON.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                new_user_name = USER_NAME_TEXT.getText().toString();
                dop = new DatabaseOperations(ctx);
                dop.updateUser(dop, user_name, user_pass, new_user_name);
                Toast.makeText(getBaseContext(),"Update success", Toast.LENGTH_LONG).show();
                finish();
            }
        });

    }


}

{'fraction_non_alphanumeric': 0.09903047091412742, 'fraction_numerical': 0.0006925207756232687, 'mean_word_length': 2.9575342465753423, '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': '5451014', 'n_tokens_mistral': 845, 'n_tokens_neox': 807, 'n_words': 153}