<commit_before>package jcalc;

import java.awt.FlowLayout;
import javax.swing.*;

/**
 * The main class of the calculator
 **/
public class JCalc implements Runnable {

    /**
     * The calculator's name. We might want to move this to a l10n file in the
     * future.
     **/
    private static final String name = "JCalc";

    public void run() {
        JFrame jf = new JFrame(name);

        final ResultView result = new ResultView();
        final JCalcModel model = new JCalcModel();
        final JCalcController controller = new JCalcController(model);
        final CommandsPanel cmds = new CommandsPanel(controller);

        model.addObserver(result);

        jf.getContentPane().setLayout(new FlowLayout());
        jf.getContentPane().add(result);
        jf.getContentPane().add(cmds);

        jf.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

        jf.pack();
        result.setVisible(true);
        jf.setVisible(true);
    }


    public static void main (String[] args) {
        SwingUtilities.invokeLater(new JCalc());
    }
}<commit_msg>initialize the model after adding the view<commit_after>package jcalc;

import java.awt.FlowLayout;
import javax.swing.*;

/**
 * The main class of the calculator
 **/
public class JCalc implements Runnable {

    /**
     * The calculator's name. We might want to move this to a l10n file in the
     * future.
     **/
    private static final String name = "JCalc";

    public void run() {
        JFrame jf = new JFrame(name);

        final ResultView result = new ResultView();
        final JCalcModel model = new JCalcModel();
        final JCalcController controller = new JCalcController(model);
        final CommandsPanel cmds = new CommandsPanel(controller);

        model.addObserver(result);
        model.reset();

        jf.getContentPane().setLayout(new FlowLayout());
        jf.getContentPane().add(result);
        jf.getContentPane().add(cmds);

        jf.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

        jf.pack();
        result.setVisible(true);
        jf.setVisible(true);
    }


    public static void main (String[] args) {
        SwingUtilities.invokeLater(new JCalc());
    }
}
{'fraction_non_alphanumeric': 0.10675182481751824, 'fraction_numerical': 0.0018248175182481751, 'mean_word_length': 2.69814502529511, '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': '5483927', 'n_tokens_mistral': 663, 'n_tokens_neox': 635, 'n_words': 173}