<commit_before>#include "stdafx.h"

#include "query.h"
#include "schema.h"

namespace You {
namespace QueryEngine {

std::unique_ptr<Query::AddTask> AddTask(Task::Description description
	, Task::Time deadline
	, Task::Priority priority
	, Task::Dependencies dependencies
	) {
	using Query::AddTask;
	AddTask* addTask = new AddTask();
	addTask->description = description;
	addTask->deadline = deadline;
	addTask->priority = priority;
	addTask->dependencies = dependencies;
	return std::unique_ptr<Query::AddTask>(addTask);
}

Response executeQuery(std::unique_ptr<Query::AddTask> query) {
	using Query::AddTask;
	return std::wstring(L"ADD");
}

std::unique_ptr<Query::GetTask> GetTask(Task::ID id) {
	using Query::GetTask;
	GetTask* getTask = new GetTask();
	getTask->taskID = id;
	return std::unique_ptr<GetTask>(getTask);
}

Response executeQuery(std::unique_ptr<Query::GetTask> query) {
	using Query::GetTask;
	return std::wstring(L"GET");
}

std::unique_ptr<Query::DeleteTask> DeleteTask(Task::ID taskID) {
	using Query::DeleteTask;
	DeleteTask* deleteTask = new DeleteTask();
	deleteTask->taskID = taskID;
	return std::unique_ptr<DeleteTask>(deleteTask);
}

Response executeQuery(std::unique_ptr<Query::DeleteTask> query) {
	using Query::DeleteTask;
	return std::wstring(L"DELETE");
}

}  // namespace QueryEngine
}  // namespace You
<commit_msg>Use unique_ptr from the beginning for safety<commit_after>#include "stdafx.h"

#include "query.h"
#include "schema.h"

namespace You {
namespace QueryEngine {

std::unique_ptr<Query::AddTask> AddTask(
	Task::Description description, Task::Time deadline,
	Task::Priority priority, Task::Dependencies dependencies) {
	std::unique_ptr<Query::AddTask> addTask(new Query::AddTask());
	addTask->description = description;
	addTask->deadline = deadline;
	addTask->priority = priority;
	addTask->dependencies = dependencies;
	return addTask;
}

Response executeQuery(std::unique_ptr<Query::AddTask> query) {
	return std::wstring(L"ADD");
}

std::unique_ptr<Query::GetTask> GetTask(Task::ID id) {
	std::unique_ptr<Query::GetTask> getTask(new Query::GetTask());
	getTask->taskID = id;
	return getTask;
}

Response executeQuery(std::unique_ptr<Query::GetTask> query) {
	return std::wstring(L"GET");
}

std::unique_ptr<Query::DeleteTask> DeleteTask(Task::ID taskID) {
	std::unique_ptr<Query::DeleteTask> deleteTask(new Query::DeleteTask());
	deleteTask->taskID = taskID;
	return deleteTask;
}

Response executeQuery(std::unique_ptr<Query::DeleteTask> query) {
	return std::wstring(L"DELETE");
}

}  // namespace QueryEngine
}  // namespace You

{'fraction_non_alphanumeric': 0.148664343786295, 'fraction_numerical': 0.0, 'mean_word_length': 7.335483870967742, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 33, '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': '2454581', 'n_tokens_mistral': 854, 'n_tokens_neox': 849, 'n_words': 164}