<commit_before>package v2.simulators;

import v2.io.reporters.Reporter;

import java.io.IOException;

/**
 * Data collector is the class responsible for collecting data during a simulation. Simulators delegate on data
 * collectors the data collection logic. To collect data from a simulation a data collector must be registered with a
 * simulation engine. After finishing the data collection the collector should be unregistered. The data
 * collector can be visited by a reporter to report its data.
 */
public interface DataCollector {

    /**
     * Reports the current collected data using the given reporter implementation.
     *
     * @param reporter reporter implementation to be used.
     */
    void report(Reporter reporter) throws IOException;

}
<commit_msg>Added methods getDataset() and clear() to teh "DataCollector" interface<commit_after>package v2.simulators;

import v2.io.reporters.Reporter;

import java.io.IOException;

/**
 * Data collector is the class responsible for collecting data during a simulation. Simulators delegate on data
 * collectors the data collection logic. To collect data from a simulation a data collector must be registered with a
 * simulation engine. After finishing the data collection the collector should be unregistered. The data
 * collector can be visited by a reporter to report its data.
 */
public interface DataCollector {

    /**
     * Gives access to the data set storing the collected data. The dataset implementation returned depends on the
     * collector implementation
     *
     * @return a dataset instance with the collected data.
     */
    Dataset getDataset();

    /**
     * Clears all data that has been collected
     */
    void clear();

    /**
     * Reports the current collected data using the given reporter implementation.
     *
     * @param reporter reporter implementation to be used.
     */
    void report(Reporter reporter) throws IOException;

}

{'fraction_non_alphanumeric': 0.058521560574948665, 'fraction_numerical': 0.002053388090349076, 'mean_word_length': 3.5011547344110854, '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': '6184914', 'n_tokens_mistral': 473, 'n_tokens_neox': 448, 'n_words': 228}