<commit_before>#ifndef PING_H
#define PING_H

#include "../measurement.h"
#include "ping_definition.h"

#include <QProcess>

class Ping : public Measurement
{
    Q_OBJECT

public:
    explicit Ping(QObject *parent = 0);
    ~Ping();

    // Measurement interface
    Status status() const;
    bool prepare(NetworkManager* networkManager, const MeasurementDefinitionPtr& measurementDefinition);
    bool start();
    bool stop();
    void waitForFinished();
    int averagePingTime();
    ResultPtr result() const;

private:
    void setStatus(Status status);

    PingDefinitionPtr definition;
    QList<int> pingTime;
    QProcess process;
    QTextStream stream;
    Status currentStatus;

private slots:
    void started();
    void finished(int exitCode, QProcess::ExitStatus exitStatus);
    void readyRead();

signals:
    void statusChanged(Status status);
    void ping(int time);
};

#endif // PING_H
<commit_msg>Bugfix<commit_after>#ifndef PING_H
#define PING_H

#include "../measurement.h"
#include "ping_definition.h"

#include <QProcess>
#include <QTextStream>

class Ping : public Measurement
{
    Q_OBJECT

public:
    explicit Ping(QObject *parent = 0);
    ~Ping();

    // Measurement interface
    Status status() const;
    bool prepare(NetworkManager* networkManager, const MeasurementDefinitionPtr& measurementDefinition);
    bool start();
    bool stop();
    void waitForFinished();
    int averagePingTime();
    ResultPtr result() const;

private:
    void setStatus(Status status);

    PingDefinitionPtr definition;
    QList<int> pingTime;
    QProcess process;
    QTextStream stream;
    Status currentStatus;

private slots:
    void started();
    void finished(int exitCode, QProcess::ExitStatus exitStatus);
    void readyRead();

signals:
    void statusChanged(Status status);
    void ping(int time);
};

#endif // PING_H

{'fraction_non_alphanumeric': 0.10139484978540772, 'fraction_numerical': 0.001072961373390558, 'mean_word_length': 3.8694516971279374, 'pattern_counts': {'":': 0, '<': 8, '<?xml version=': 0, '>': 8, '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': '6872314', 'n_tokens_mistral': 571, 'n_tokens_neox': 549, 'n_words': 156}