<commit_before>#include "stdafx.h"
#include "EntryList.h"
#include "String.h"

EntryList::EntryList()
{
	m_EntryCount = 0;
	m_Pad = 0;
}

void EntryList::Parse()
{
	m_EntryCount = m_Parser.Get<DWORD>();
	m_Pad = m_Parser.Get<DWORD>();

	if (m_EntryCount && m_EntryCount < _MaxEntriesLarge)
	{
		{
			for (DWORD i = 0; i < m_EntryCount; i++)
			{
				EntryListEntryStruct entryListEntryStruct;
				entryListEntryStruct.EntryLength = m_Parser.Get<DWORD>();
				entryListEntryStruct.EntryLengthPad = m_Parser.Get<DWORD>();
				m_Entry.push_back(entryListEntryStruct);
			}

			for (DWORD i = 0; i < m_EntryCount; i++)
			{
				size_t cbRemainingBytes = min(m_Entry[i].EntryLength, m_Parser.RemainingBytes());
				m_Entry[i].EntryId.Init(cbRemainingBytes, m_Parser.GetCurrentAddress());
				m_Parser.Advance(cbRemainingBytes);
			}
		}
	}
}

_Check_return_ wstring EntryList::ToStringInternal()
{
	auto szEntryList = formatmessage(IDS_ENTRYLISTDATA,
		m_EntryCount,
		m_Pad);

	for (DWORD i = 0; i < m_EntryCount; i++)
	{
		szEntryList += formatmessage(IDS_ENTRYLISTENTRYID,
			i,
			m_Entry[i].EntryLength,
			m_Entry[i].EntryLengthPad);

		szEntryList += m_Entry[i].EntryId.ToString();
	}

	return szEntryList;
}<commit_msg>bad array count in EntryList::ToStringInternal<commit_after>#include "stdafx.h"
#include "EntryList.h"
#include "String.h"

EntryList::EntryList()
{
	m_EntryCount = 0;
	m_Pad = 0;
}

void EntryList::Parse()
{
	m_EntryCount = m_Parser.Get<DWORD>();
	m_Pad = m_Parser.Get<DWORD>();

	if (m_EntryCount && m_EntryCount < _MaxEntriesLarge)
	{
		{
			for (DWORD i = 0; i < m_EntryCount; i++)
			{
				EntryListEntryStruct entryListEntryStruct;
				entryListEntryStruct.EntryLength = m_Parser.Get<DWORD>();
				entryListEntryStruct.EntryLengthPad = m_Parser.Get<DWORD>();
				m_Entry.push_back(entryListEntryStruct);
			}

			for (DWORD i = 0; i < m_EntryCount; i++)
			{
				size_t cbRemainingBytes = min(m_Entry[i].EntryLength, m_Parser.RemainingBytes());
				m_Entry[i].EntryId.Init(cbRemainingBytes, m_Parser.GetCurrentAddress());
				m_Parser.Advance(cbRemainingBytes);
			}
		}
	}
}

_Check_return_ wstring EntryList::ToStringInternal()
{
	auto szEntryList = formatmessage(IDS_ENTRYLISTDATA,
		m_EntryCount,
		m_Pad);

	for (DWORD i = 0; i < m_Entry.size(); i++)
	{
		szEntryList += formatmessage(IDS_ENTRYLISTENTRYID,
			i,
			m_Entry[i].EntryLength,
			m_Entry[i].EntryLengthPad);

		szEntryList += m_Entry[i].EntryId.ToString();
	}

	return szEntryList;
}
{'fraction_non_alphanumeric': 0.13674868898749495, 'fraction_numerical': 0.004033884630899556, 'mean_word_length': 4.7407407407407405, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 11, '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': '6923530', 'n_tokens_mistral': 1042, 'n_tokens_neox': 930, 'n_words': 150}