<commit_before>package edu.uh.findtheroot;

import android.app.Activity;
import android.os.Bundle;
import android.text.Html;
import android.widget.TextView;

import java.util.ArrayList;

public class SecantActivity extends Activity {

    TextView eqTextView;
    ArrayList<Double> coefficients;
    ArrayList<Integer> exponents;
    private final static String TAG = "Secant";
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_secant);
        eqTextView = (TextView) findViewById(R.id.textViewEquationSecant);
        coefficients = (ArrayList<Double>) getIntent().getSerializableExtra("coefficients");
        exponents = getIntent().getIntegerArrayListExtra("exponents");
        String eq = getIntent().getStringExtra("equation");
        eqTextView.setText(Html.fromHtml(eq));
    }
}<commit_msg>secant implementation<commit_after>package edu.uh.findtheroot;

import android.app.Activity;
import android.os.Bundle;
import android.text.Html;
import android.util.Log;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.TextView;

import java.util.ArrayList;

public class SecantActivity extends Activity {

    TextView eqTextView;
    ArrayList<Double> coefficients;
    ArrayList<Integer> exponents;
    private final static String TAG = "Secant";
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_secant);
        eqTextView = (TextView) findViewById(R.id.editTextAValueSecant);
        final EditText aValue = (EditText) findViewById(R.id.editTextBValueSecant);
        final EditText bValue = (EditText) findViewById(R.id.editTextIterationsSecant);
        final EditText iterations = (EditText) findViewById(R.id.editTextIterationsSecant);
        final EditText tolerance = (EditText) findViewById(R.id.editTextToleranceSecant);
        final TextView computedValueTextView = (TextView) findViewById(R.id.txtViewValueSecant);

        coefficients = (ArrayList<Double>) getIntent().getSerializableExtra("coefficients");
        exponents = getIntent().getIntegerArrayListExtra("exponents");
        String eq = getIntent().getStringExtra("equation");
        eqTextView.setText(Html.fromHtml(eq));

        Button btnSolve = (Button) findViewById(R.id.btnSolveSecant);
        btnSolve.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                // compute the answer
                EquationBuilder equationBuilder = new EquationBuilder(coefficients, exponents);
                RegulaFalsi equation = new RegulaFalsi(equationBuilder);
                double computedValue = equation.compute(
                        Helper.getDoubleFromString(aValue.getText().toString()),
                        Helper.getDoubleFromString(bValue.getText().toString()),
                        Helper.getDoubleFromString(tolerance.getText().toString()),
                        Helper.getDoubleFromString(iterations.getText().toString())
                );

                Log.d(TAG, "value: " + computedValue);
                computedValueTextView.setText(""+computedValue);
            }
        });
    }
}
{'fraction_non_alphanumeric': 0.09949208246190619, 'fraction_numerical': 0.0, 'mean_word_length': 3.359375, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, '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': '418720', 'n_tokens_mistral': 879, 'n_tokens_neox': 821, 'n_words': 164}