<commit_before>#include "CoBaB.h"

SearchObject::SearchObject() {

}

QString SearchObject::getMedium() {
    return mMedium;
}

void SearchObject::setMedium(QString medium) {
    mMedium = medium;
}

Annotation *SearchObject::getAnnotation() {
    return mAnnotation;
}

void SearchObject::setAnnotation(Annotation *annotation) {
    mAnnotation = annotation;
}

QRect *SearchObject::getROI() {
    return mROI;
}

void SearchObject::setROI(QRect *roi) {
    mROI = roi;
}

QString SearchObject::getSourceDataset() {
    return mSourceDataset;
}

void SearchObject::setSourceDataset(QString dataset) {
    mSourceDataset = dataset;
}

int SearchObject::getMediumIndex() {
    return mMediumIndex;
}

void SearchObject::setMediumIndex(int index) {
    mMediumIndex = index;
}

void SearchObject::toStream(QDataStream in) {

    in << *this;

}

void SearchObject::fromStream(QDataStream out) {

    out >> *this;

}

QDataStream& operator >>(QDataStream &in, SearchObject &searchObject) {

    //read object from stream

    QString medium;
    int mediumIndex;
    Annotation *ann = new Annotation("", "");
    QRect *roi;
    QString source;

    //skip opening bracket
    in.skipRawData(1);

    in >> medium;
    searchObject.setMedium(medium);

    //skip coma
    in.skipRawData(2);

    in >> mediumIndex;
    searchObject.setMediumIndex(mediumIndex);

    in.skipRawData(2);

    in >> *ann;<commit_msg>Fixing errors<commit_after>#include "CoBaB.h"

SearchObject::SearchObject() {

}

QString SearchObject::getMedium() {
    return mMedium;
}

void SearchObject::setMedium(QString medium) {
    mMedium = medium;
}

Annotation *SearchObject::getAnnotation() {
    return mAnnotation;
}

void SearchObject::setAnnotation(Annotation *annotation) {
    mAnnotation = annotation;
}

QRect *SearchObject::getROI() {
    return mROI;
}

void SearchObject::setROI(QRect *roi) {
    mROI = roi;
}

QString SearchObject::getSourceDataset() {
    return mSourceDataset;
}

void SearchObject::setSourceDataset(QString dataset) {
    mSourceDataset = dataset;
}

int SearchObject::getMediumIndex() {
    return mMediumIndex;
}

void SearchObject::setMediumIndex(int index) {
    mMediumIndex = index;
}

void SearchObject::toStream(QDataStream in) {

    in << *this;

}

void SearchObject::fromStream(QDataStream out) {

    out >> *this;

}

QDataStream& operator >>(QDataStream &in, SearchObject &searchObject) {

    //read object from stream

    QString medium;
    int mediumIndex;
    Annotation *ann = new Annotation("", "");
    QRect *roi = new QRect();
    QString source;

    //skip opening bracket
    in.skipRawData(1);

    in >> medium;
    searchObject.setMedium(medium);

    //skip coma
    in.skipRawData(2);

    in >> mediumIndex;
    searchObject.setMediumIndex(mediumIndex);

    in.skipRawData(2);

    in >> *ann;
{'fraction_non_alphanumeric': 0.1222692036645525, 'fraction_numerical': 0.0021141649048625794, 'mean_word_length': 3.937391304347826, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 23, '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': '6580028', 'n_tokens_mistral': 957, 'n_tokens_neox': 925, 'n_words': 194}