<commit_before>package edu.rit.se.crashavoidance.views;

import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.Toolbar;
import android.text.method.ScrollingMovementMethod;
import android.util.Log;
import android.widget.TextView;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

import edu.rit.se.crashavoidance.R;

public class LogsActivity extends AppCompatActivity {

    private String log;
    private TextView logTextView;
    private Thread mThread;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_logs);
        Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
        setSupportActionBar(toolbar);

        getSupportActionBar().setDisplayHomeAsUpEnabled(true);

        logTextView = (TextView) findViewById(R.id.logTextView);
        logTextView.setMovementMethod(new ScrollingMovementMethod());
        Log.i("TEST-TAG", "Viewing Logs");
        try {
            Process process = Runtime.getRuntime().exec("logcat -d");
            BufferedReader bufferedReader = new BufferedReader(
                    new InputStreamReader(process.getInputStream()));

            StringBuilder log=new StringBuilder();
            String line = "";
            while ((line = bufferedReader.readLine()) != null) {
                if (line.contains("TEST-TAG")){
                    log.append(line);
                }
            }
            logTextView.setText(log.toString());
        } catch (IOException e) {
        }

//        Intent intent = getIntent();
//        String log = intent.getStringExtra(initActivity.EXTRA_LOG);
//
//        logTextView.setText(log);
    }

}<commit_msg>Removes extra text from the log messages<commit_after>package edu.rit.se.crashavoidance.views;

import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.Toolbar;
import android.text.method.ScrollingMovementMethod;
import android.util.Log;
import android.widget.TextView;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

import edu.rit.se.crashavoidance.R;

public class LogsActivity extends AppCompatActivity {

    private String log;
    private TextView logTextView;
    private Thread mThread;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_logs);
        Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
        setSupportActionBar(toolbar);

        getSupportActionBar().setDisplayHomeAsUpEnabled(true);

        logTextView = (TextView) findViewById(R.id.logTextView);
        logTextView.setMovementMethod(new ScrollingMovementMethod());
        Log.i("TEST-TAG", "Viewing Logs");
        try {
            Process process = Runtime.getRuntime().exec("logcat -d");
            BufferedReader bufferedReader = new BufferedReader(
                    new InputStreamReader(process.getInputStream()));

            StringBuilder log=new StringBuilder();
            String line = "";
            while ((line = bufferedReader.readLine()) != null) {
                if (line.contains("TEST-TAG")){
                    log.append(line.substring(line.indexOf(": ") + 2) + "\n");
                }
            }
            logTextView.setText(log.toString());
        } catch (IOException e) {
        }

//        Intent intent = getIntent();
//        String log = intent.getStringExtra(initActivity.EXTRA_LOG);
//
//        logTextView.setText(log);
    }

}
{'fraction_non_alphanumeric': 0.10900216919739697, 'fraction_numerical': 0.0013557483731019523, 'mean_word_length': 2.799176107106076, 'pattern_counts': {'":': 1, '<': 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': '2769665', 'n_tokens_mistral': 1004, 'n_tokens_neox': 971, 'n_words': 190}