<commit_before>#pragma once
#include <rapidjson/document.h>
#include <staticjson/basic.hpp>

#include <array>

namespace staticjson
{
using rapidjson::Document;
using rapidjson::Value;

typedef rapidjson::MemoryPoolAllocator<> MemoryPoolAllocator;

class JSONHandler : public BaseHandler
{
private:
    static const int MAX_DEPTH = 16;

    std::array<Value, MAX_DEPTH> m_stack;
    Value* m_value;
    MemoryPoolAllocator* m_alloc;
    int m_depth;

private:
    bool stack_push();
    void stack_pop();
    Value& stack_top();
    bool postprocess();
    bool set_corrupted_dom();

public:
    explicit JSONHandler(Value* v, MemoryPoolAllocator* a);

    std::string type_name() const override;

    virtual bool Null() override;

    virtual bool Bool(bool) override;

    virtual bool Int(int) override;

    virtual bool Uint(unsigned) override;

    virtual bool Int64(std::int64_t) override;
<commit_msg>Double the depth of stack<commit_after>#pragma once
#include <rapidjson/document.h>
#include <staticjson/basic.hpp>

#include <array>

namespace staticjson
{
using rapidjson::Document;
using rapidjson::Value;

typedef rapidjson::MemoryPoolAllocator<> MemoryPoolAllocator;

class JSONHandler : public BaseHandler
{
private:
    static const int MAX_DEPTH = 32;

    std::array<Value, MAX_DEPTH> m_stack;
    Value* m_value;
    MemoryPoolAllocator* m_alloc;
    int m_depth;

private:
    bool stack_push();
    void stack_pop();
    Value& stack_top();
    bool postprocess();
    bool set_corrupted_dom();

public:
    explicit JSONHandler(Value* v, MemoryPoolAllocator* a);

    std::string type_name() const override;

    virtual bool Null() override;

    virtual bool Bool(bool) override;

    virtual bool Int(int) override;

    virtual bool Uint(unsigned) override;

    virtual bool Int64(std::int64_t) override;

{'fraction_non_alphanumeric': 0.09923664122137404, 'fraction_numerical': 0.006543075245365322, 'mean_word_length': 4.445103857566766, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, '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': '1340365', 'n_tokens_mistral': 593, 'n_tokens_neox': 564, 'n_words': 158}