<commit_before>package com.brownian.morse;

import java.io.File;
import java.io.FileInputStream;
import javax.sound.sampled.*;
import javax.swing.*;
import javax.sound.midi.*;

public class Main extends JFrame {

    private static final long serialVersionUID = 1L;

    public static void main(String[] args) {
        SwingUtilities.invokeLater(() -> {
            Main app = new Main();
            app.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            app.startApp();
        });
    }

    public Main() {
        initGUI();
    }

    private void startApp() {
        playStartupSound();
        setVisible(true);
    }

    private void endApp() {
        System.exit(0);
    }

    private void playStartupSound() {
        Runnable soundPlayer = new MorsePlayer();
        Thread soundPlayingThread = new Thread(soundPlayer);
        soundPlayingThread.start();
    }

    private void initGUI() {
        setSize(300, 200);
    }
}<commit_msg>Added detailed documentation. Simplified classes. Created factory methods that generate default implementations of the various Receivers.<commit_after>package com.brownian.morse;

import javax.swing.*;
import javax.sound.midi.*;

public class Main extends JFrame {

    private static final long serialVersionUID = 1L;

    private static final int INSTRUMENT = 83;

    public static void main(String[] args) {
        SwingUtilities.invokeLater(() -> {
            Main app = new Main();
            app.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            app.startApp();
        });
    }

    public Main() {
        initGUI();
    }

    private void startApp() {
        playStartupSound();
        setVisible(true);
    }

    private void endApp() {
        System.exit(0);
    }

    private void playStartupSound() {
        try {
            LatinReceiver latinReceiver = LatinReceiver.getReceiver();
            latinReceiver.send("sos");
        } catch (MidiUnavailableException e){
            System.err.println("MIDI not available.");
            e.printStackTrace(System.err);
            endApp();
        }
    }

    private void initGUI() {
        setSize(300, 200);
    }
}
{'fraction_non_alphanumeric': 0.10650069156293222, 'fraction_numerical': 0.008298755186721992, 'mean_word_length': 2.3180428134556577, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '3607029', 'n_tokens_mistral': 625, 'n_tokens_neox': 589, 'n_words': 147}