<commit_before>package seedu.typed.ui;

import javafx.fxml.FXML;
import javafx.scene.layout.AnchorPane;
import javafx.scene.layout.Region;
import javafx.scene.text.Text;
import seedu.typed.model.Model;

public class TaskCounter extends UiPart<Region> {
    private static final String FXML = "TaskCounter.fxml";

    private Model model;

    @FXML
    private Text completedCount, pendingCount;

    @FXML
    private Text Completed, Pending;

    public TaskCounter(AnchorPane taskCounterPlaceholder, Model model) {
        super(FXML);
        this.model = model;

        taskCounterPlaceholder.getChildren().add(Completed);
        taskCounterPlaceholder.getChildren().add(Pending);
        taskCounterPlaceholder.getChildren().add(completedCount);
        taskCounterPlaceholder.getChildren().add(pendingCount);

        completedCount.setText(model.getNumberCompletedTasks() + "");
        pendingCount.setText(model.getNumberUncompletedTasks() + "");
    }
}
<commit_msg>enable updating for TaskCounter<commit_after>package seedu.typed.ui;

import com.google.common.eventbus.Subscribe;

import javafx.fxml.FXML;
import javafx.scene.layout.AnchorPane;
import javafx.scene.layout.Region;
import javafx.scene.text.Text;
import seedu.typed.commons.events.ui.NewResultAvailableEvent;
import seedu.typed.model.Model;

public class TaskCounter extends UiPart<Region> {
    private static final String FXML = "TaskCounter.fxml";

    private Model model;

    @FXML
    private Text completedCount, pendingCount;

    @FXML
    private Text Completed, Pending;

    public TaskCounter(AnchorPane taskCounterPlaceholder, Model model) {
        super(FXML);
        this.model = model;

        taskCounterPlaceholder.getChildren().add(Completed);
        taskCounterPlaceholder.getChildren().add(Pending);
        taskCounterPlaceholder.getChildren().add(completedCount);
        taskCounterPlaceholder.getChildren().add(pendingCount);

        completedCount.setText(model.getNumberCompletedTasks() + "");
        pendingCount.setText(model.getNumberUncompletedTasks() + "");
        registerAsAnEventHandler(this);
    }

    @Subscribe
    private void handleNewResultAvailableEvent(NewResultAvailableEvent event) {
        completedCount.setText(model.getNumberCompletedTasks() + "");
        pendingCount.setText(model.getNumberUncompletedTasks() + "");
    }

}

{'fraction_non_alphanumeric': 0.10097169412758766, 'fraction_numerical': 0.0, 'mean_word_length': 4.125541125541125, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 4}, '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': '3129180', 'n_tokens_mistral': 665, 'n_tokens_neox': 653, 'n_words': 115}