<commit_before>#pragma once
#include <QFile>
#include <bearparser.h>

typedef QMap<QString, offset_t> FuncToThunk;

class ImportsLookup : public QObject
{
    Q_OBJECT

public:
    ImportsLookup() { }

    void wrap(ImportDirWrapper* imports);

    QString thunkToLibName(offset_t thunk) { return (m_Imports) ? m_Imports->thunkToLibName(thunk) : NULL; }
    QString thunkToFuncName(offset_t thunk) { return (m_Imports) ? m_Imports->thunkToFuncName(thunk) : NULL; }

    bool hasLib(QString libName);
    bool hasFunc(QString funcName);
    offset_t findThunk(QString libName, QString funcName);

    size_t countLibs() { return m_libs.size(); }
    size_t countImps() { return (m_Imports == NULL) ? 0 : m_Thunks.size(); }<commit_msg>[BUGFIX] In ImportsLookup: fixed inconsistent return type<commit_after>#pragma once
#include <QFile>
#include <bearparser.h>

typedef QMap<QString, offset_t> FuncToThunk;

class ImportsLookup : public QObject
{
    Q_OBJECT

public:
    ImportsLookup() { }

    void wrap(ImportDirWrapper* imports);

    QString thunkToLibName(offset_t thunk) { return (m_Imports) ? m_Imports->thunkToLibName(thunk) : ""; }
    QString thunkToFuncName(offset_t thunk) { return (m_Imports) ? m_Imports->thunkToFuncName(thunk) : ""; }

    bool hasLib(QString libName);
    bool hasFunc(QString funcName);
    offset_t findThunk(QString libName, QString funcName);

    size_t countLibs() { return m_libs.size(); }
    size_t countImps() { return (m_Imports == NULL) ? 0 : m_Thunks.size(); }
{'fraction_non_alphanumeric': 0.11620185922974767, 'fraction_numerical': 0.0013280212483399733, 'mean_word_length': 4.818532818532819, 'pattern_counts': {'":': 0, '<': 9, '<?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': '2096560', 'n_tokens_mistral': 546, 'n_tokens_neox': 530, 'n_words': 116}