<commit_before>#include "containers/uuid.hpp"

#include <string.h>

#include "errors.hpp"
#define BOOST_UUID_NO_TYPE_TRAITS
#include <boost/uuid/uuid.hpp>
#include <boost/uuid/uuid_generators.hpp>
#include <boost/uuid/uuid_io.hpp>

#include "containers/printf_buffer.hpp"

#include "utils.hpp"

bool operator==(const uuid_t& x, const uuid_t& y) {
    return memcmp(x.data(), y.data(), uuid_t::static_size()) == 0;
}

bool operator<(const uuid_t& x, const uuid_t& y) {
    return memcmp(x.data(), y.data(), uuid_t::static_size()) < 0;
}

uuid_t from_boost_uuid(const boost::uuids::uuid& uuid) {
    CT_ASSERT(sizeof(uuid_t) == sizeof(boost::uuids::uuid));

    uuid_t ret;
    memcpy(ret.data(), uuid.data, uuid_t::static_size());
    return ret;
}

boost::uuids::uuid as_boost_uuid(const uuid_t& uuid) {
    boost::uuids::uuid ret;
    memcpy(ret.data, uuid.data(), uuid_t::static_size());
    return ret;
}

uuid_t generate_uuid() {
#ifndef VALGRIND
    return from_boost_uuid(boost::uuids::random_generator()());
#else
    uuid_t ret;
    uint8_t *dat = ret.data();
    for (size_t i = 0; i < ret.static_size(); i++) {
        dat[i] = static_cast<uint8_t>(randint(256));
    }
    return ret;
#endif
}

uuid_t nil_uuid() {
    uuid_t ret;
    memset(ret.data(), 0, uuid_t::static_size());
    return ret;
}

void debug_print(append_only_printf_buffer_t *buf, const uuid_t& id) {
    buf->appendf("%s", uuid_to_str(id).c_str());
}
<commit_msg>Called static method static_size in a way that looks like a static method call, in uuid.cc.<commit_after>#include "containers/uuid.hpp"

#include <string.h>

#include "errors.hpp"
#define BOOST_UUID_NO_TYPE_TRAITS
#include <boost/uuid/uuid.hpp>
#include <boost/uuid/uuid_generators.hpp>
#include <boost/uuid/uuid_io.hpp>

#include "containers/printf_buffer.hpp"

#include "utils.hpp"

bool operator==(const uuid_t& x, const uuid_t& y) {
    return memcmp(x.data(), y.data(), uuid_t::static_size()) == 0;
}

bool operator<(const uuid_t& x, const uuid_t& y) {
    return memcmp(x.data(), y.data(), uuid_t::static_size()) < 0;
}

uuid_t from_boost_uuid(const boost::uuids::uuid& uuid) {
    CT_ASSERT(sizeof(uuid_t) == sizeof(boost::uuids::uuid));

    uuid_t ret;
    memcpy(ret.data(), uuid.data, uuid_t::static_size());
    return ret;
}

boost::uuids::uuid as_boost_uuid(const uuid_t& uuid) {
    boost::uuids::uuid ret;
    memcpy(ret.data, uuid.data(), uuid_t::static_size());
    return ret;
}

uuid_t generate_uuid() {
#ifndef VALGRIND
    return from_boost_uuid(boost::uuids::random_generator()());
#else
    uuid_t ret;
    uint8_t *dat = ret.data();
    for (size_t i = 0; i < uuid_t::static_size(); i++) {
        dat[i] = static_cast<uint8_t>(randint(256));
    }
    return ret;
#endif
}

uuid_t nil_uuid() {
    uuid_t ret;
    memset(ret.data(), 0, uuid_t::static_size());
    return ret;
}

void debug_print(append_only_printf_buffer_t *buf, const uuid_t& id) {
    buf->appendf("%s", uuid_to_str(id).c_str());
}

{'fraction_non_alphanumeric': 0.16756393001345896, 'fraction_numerical': 0.006056527590847914, 'mean_word_length': 4.641366223908919, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 15, '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': '7112964', 'n_tokens_mistral': 1147, 'n_tokens_neox': 1167, 'n_words': 229}