<commit_before>package pl.nag;

import android.app.Activity;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;

public class MainActivity extends Activity {

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

    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        // Inflate the menu; this adds items to the action bar if it is present.
        getMenuInflater().inflate(R.menu.menu_main, menu);
        return true;
    }

    @Override
    public boolean onOptionsItemSelected(MenuItem item) {
        // Handle action bar item clicks here. The action bar will
        // automatically handle clicks on the Home/Up button, so long
        // as you specify a parent activity in AndroidManifest.xml.
        int id = item.getItemId();

        //noinspection SimplifiableIfStatement
        if (id == R.id.action_settings) {
            return true;
        }

        return super.onOptionsItemSelected(item);
    }
}<commit_msg>onClick super logic mastermind to the resq<commit_after>package pl.nag;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;

public class MainActivity extends Activity implements View.OnClickListener {
    public static String INTENT_INDEX = "INDEX";
    public static String INTENT_POINTS = "POINTS";

    int points;
    int index;

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

        Intent incomingIntent = this.getIntent();

        index = incomingIntent.getIntExtra(INTENT_INDEX, 0);
        points = incomingIntent.getIntExtra(INTENT_POINTS, 0);

        Log.d("StateLog", "Application index: " + index);
        Log.d("StateLog", "Points: " + points);
    }

    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        // Inflate the menu; this adds items to the action bar if it is present.
        getMenuInflater().inflate(R.menu.menu_main, menu);
        return true;
    }

    @Override
    public boolean onOptionsItemSelected(MenuItem item) {
        // Handle action bar item clicks here. The action bar will
        // automatically handle clicks on the Home/Up button, so long
        // as you specify a parent activity in AndroidManifest.xml.
        int id = item.getItemId();

        //noinspection SimplifiableIfStatement
        if (id == R.id.action_settings) {
            return true;
        }

        return super.onOptionsItemSelected(item);
    }

    @Override
    public void onClick(View view) {
        Intent nextIntent;



        switch (view.getId()) {
            case (R.id.answer0):
                nextIntent = new Intent(this, MainActivity.class);
                break;
            case (R.id.answer1):
                nextIntent = new Intent(this, MainActivity.class);
                break;
            case (R.id.answer2):
                nextIntent = new Intent(this, MainActivity.class);
                break;
            case (R.id.answer3):
                nextIntent = new Intent(this, MainActivity.class);
                break;
            default:
                nextIntent = null;
        }

        nextIntent.putExtra("POINTS", points);
        nextIntent.putExtra("INDEX", index+1);
        startActivity(nextIntent);
    }
}
{'fraction_non_alphanumeric': 0.08884529147982063, 'fraction_numerical': 0.001961883408071749, 'mean_word_length': 2.373345935727788, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, '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': '4217564', 'n_tokens_mistral': 971, 'n_tokens_neox': 931, 'n_words': 267}