<commit_before>int sqlite_get_msa(LOGGER log, sqlite3* db, const char* username) {


	char* sql = "SELECT msa_user, msa_inrouter, msa_inroute, msa_outrouter, msa_outroute FROM msa WHERE msa_user LIKE ?";

	sqlite3_stmt* stmt = database_prepare(log, db, sql);

	if (!stmt) {
		return 2;
	}

	if (sqlite3_bind_text(stmt, 1, username, -1, SQLITE_STATIC) != SQLITE_OK) {
		logprintf(log, LOG_ERROR, "Cannot bind expression.\n");
		return 3;
	}

	int status;
	const char* user;
	const char* inrouter;
	const char* inroute;
	const char* outrouter;
	const char* outroute;

	printf("%20s | %10s | %15s | %10s | %15s\n%s\n", "User", "inrouter", "inroute", "outrouter", "outroute",
			"---------------------+------------+-----------------+------------+----------------");

	while ((status = sqlite3_step(stmt)) == SQLITE_ROW) {

		user = (const char*) sqlite3_column_text(stmt, 0);
		inrouter = (const char*) sqlite3_column_text(stmt, 1);
		inroute = (const char*) sqlite3_column_text(stmt, 2);
		outrouter = (const char*) sqlite3_column_text(stmt, 3);
		outroute = (const char*) sqlite3_column_text(stmt, 4);
		printf("%20s | %10s | %15s | %10s | %15s\n", user, inrouter, inroute, outrouter, outroute);
	}

	sqlite3_finalize(stmt);
	if (status == SQLITE_DONE) {
		return 0;
	}

	return status;
}

int sqlite_get_all_msa(LOGGER log, sqlite3* db) {

	char* sql = "SELECT msa_user, msa_inrouter, msa_inroute, msa_outrouter, msa_outroute FROM msa";
	sqlite3_stmt* stmt = database_prepare(log, db, sql);<commit_msg>fixing null value output<commit_after>int sqlite_get_msa(LOGGER log, sqlite3* db, const char* username) {


	char* sql = "SELECT msa_user, msa_inrouter, msa_inroute, msa_outrouter, msa_outroute FROM msa WHERE msa_user LIKE ?";

	sqlite3_stmt* stmt = database_prepare(log, db, sql);

	if (!stmt) {
		return 2;
	}

	if (sqlite3_bind_text(stmt, 1, username, -1, SQLITE_STATIC) != SQLITE_OK) {
		logprintf(log, LOG_ERROR, "Cannot bind expression.\n");
		return 3;
	}

	int status;
	const char* user;
	const char* inrouter;
	const char* inroute;
	const char* outrouter;
	const char* outroute;

	printf("%20s | %10s | %15s | %10s | %15s\n%s\n", "User", "inrouter", "inroute", "outrouter", "outroute",
			"---------------------+------------+-----------------+------------+----------------");

	while ((status = sqlite3_step(stmt)) == SQLITE_ROW) {

		user = (const char*) sqlite3_column_text(stmt, 0);
		inrouter = (const char*) sqlite3_column_text(stmt, 1);
		inroute = (const char*) sqlite3_column_text(stmt, 2);
		outrouter = (const char*) sqlite3_column_text(stmt, 3);
		outroute = (const char*) sqlite3_column_text(stmt, 4);
		printf("%20s | %10s | %15s | %10s | %15s\n", user, inrouter, inroute ? inroute : "", outrouter, outroute ? outroute : "");
	}

	sqlite3_finalize(stmt);
	if (status == SQLITE_DONE) {
		return 0;
	}

	return status;
}

int sqlite_get_all_msa(LOGGER log, sqlite3* db) {

	char* sql = "SELECT msa_user, msa_inrouter, msa_inroute, msa_outrouter, msa_outroute FROM msa";
	sqlite3_stmt* stmt = database_prepare(log, db, sql);
{'fraction_non_alphanumeric': 0.19185282522996058, 'fraction_numerical': 0.02759526938239159, 'mean_word_length': 3.7877358490566038, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '2446236', 'n_tokens_mistral': 1239, 'n_tokens_neox': 1125, 'n_words': 282}