<commit_before>package app.ddf.danskdatahistoriskforening;

import android.media.MediaRecorder;
import android.util.Log;

import java.io.Console;
import java.io.IOException;

public class RadioGaga {
    boolean isRecording;
    private MediaRecorder mRecorder;
    private String mFileName = "TEST FOR NOW";

    public void execute() {
        if (!isRecording)
            startRecord();
        else
            stopRecord();
    }

    private void startRecord() {
        mRecorder = new MediaRecorder();
        mRecorder.setAudioSource(MediaRecorder.AudioSource.MIC);
        mRecorder.setOutputFormat(MediaRecorder.OutputFormat.THREE_GPP);
        mRecorder.setOutputFile(mFileName);
        mRecorder.setAudioEncoder(MediaRecorder.AudioEncoder.AMR_NB);
        System.out.println("START RECORDING FILE: mFileName");
        try {
            mRecorder.prepare();
        } catch (IOException e) {
            e.printStackTrace();
        }
        mRecorder.start();
    }

    private void stopRecord() {
        if(mRecorder==null)
            return;
        System.out.println("STOP RECORDING");
        mRecorder.stop();
        mRecorder.release();
        mRecorder = null;
    }

    public void requestStop() {
        if (isRecording)
            stopRecord();
    }
}<commit_msg>Recordings<commit_after>package app.ddf.danskdatahistoriskforening;

import android.media.MediaRecorder;
import android.os.Environment;
import android.util.Log;

import java.io.Console;
import java.io.IOException;

public class RadioGaga {
    boolean isRecording;
    private MediaRecorder mRecorder;

    public void execute() {
        if (!isRecording)
            startRecord();
        else
            stopRecord();
    }

    private void startRecord() {
        isRecording = true;
        String mFileName = Environment.getExternalStorageDirectory().getAbsolutePath();
        mFileName += "/audiorecordtest.3gp";

        Log.d("DFF",mFileName);

        mRecorder = new MediaRecorder();
        mRecorder.setAudioSource(MediaRecorder.AudioSource.MIC);
        mRecorder.setOutputFormat(MediaRecorder.OutputFormat.THREE_GPP);
        mRecorder.setOutputFile(mFileName);
        mRecorder.setAudioEncoder(MediaRecorder.AudioEncoder.AMR_NB);
        System.out.println("START RECORDING FILE: mFileName");
        try {
            mRecorder.prepare();
        } catch (IOException e) {
            e.printStackTrace();
        }
        mRecorder.start();
    }

    private void stopRecord() {
        if(mRecorder==null)
            return;
        System.out.println("STOP RECORDING");
        mRecorder.stop();
        mRecorder.release();
        mRecorder = null;
        isRecording = false;
    }

    public void requestStop() {
        if (isRecording)
            stopRecord();
    }
}
{'fraction_non_alphanumeric': 0.10160427807486631, 'fraction_numerical': 0.00035650623885918, 'mean_word_length': 2.426129426129426, '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': '5451978', 'n_tokens_mistral': 814, 'n_tokens_neox': 793, 'n_words': 146}