<commit_before>'use strict';

/**
 * Module dependencies.
 */
var errorHandler = require('../errors'),
	mongoose = require('mongoose'),
	User = mongoose.model('User');

exports.getDisplayName = function(req, res) {
	var id = req.body.session.id;
	var query = User.findOne({_id:id });
	var theResult = undefined;
	var theError = undefined;
	query.exec(function(err,result) {
		theResult = result;
		theError = err; });
	if (theError) {
		res.status(400).send(theError);
	} else if (!theResult) {
		res.status(400).send("No result!");
	} else {
		res.status(200).send(theResult.displayName);
	}
};

<commit_msg>Syntax fixes<commit_after>'use strict';

/**
 * Module dependencies.
 */
var errorHandler = require('../errors'),
	mongoose = require('mongoose'),
	User = mongoose.model('User');

exports.getDisplayName = function(req, res) {
	var id = req.body.session.id;
	var query = User.findOne({_id:id });
	var theResult = undefined;
	var theError = undefined;
	query.exec(function(err,result) {
		theResult = result;
		theError = err; });
	if (theError) {
		res.status(400).send(theError);
	} else if (!theResult) {
		res.status(400).json({displayName: "No display name found!"});
	} else {
		res.status(200).json({displayName: theResult.displayName});
	}
};


{'fraction_non_alphanumeric': 0.17791898332009531, 'fraction_numerical': 0.014297061159650517, 'mean_word_length': 4.526315789473684, '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': '2271524', 'n_tokens_mistral': 457, 'n_tokens_neox': 438, 'n_words': 87}