<commit_before>var keystone   = require('keystone'),
    middleware = require('./middleware'),
    sitemap    = require('keystone-express-sitemap');

var importRoutes = keystone.importer(__dirname),
    // Import Route Controllers
    routes = {
        views: importRoutes('./views')
    };

// Common Middleware
keystone.pre('routes', middleware.initLocals);
keystone.pre('routes', middleware.initErrorHandlers);
keystone.pre('routes', middleware.initCategories);
keystone.pre('routes', middleware.loadPinned);
keystone.pre('render', middleware.flashMessages);

// Handle other errors
keystone.set('500', function(err, req, res, next) {
    res.serverError(err, title, message);
});
<commit_msg>[master] Fix error middleware arguments mismatch, @<commit_after>var keystone   = require('keystone'),
    middleware = require('./middleware'),
    sitemap    = require('keystone-express-sitemap');

var importRoutes = keystone.importer(__dirname),
    // Import Route Controllers
    routes = {
        views: importRoutes('./views')
    };

// Common Middleware
keystone.pre('routes', middleware.initLocals);
keystone.pre('routes', middleware.initErrorHandlers);
keystone.pre('routes', middleware.initCategories);
keystone.pre('routes', middleware.loadPinned);
keystone.pre('render', middleware.flashMessages);

// Handle other errors
keystone.set('500', function(err, req, res, next) {
    res.serverError(err);
});

{'fraction_non_alphanumeric': 0.15254237288135594, 'fraction_numerical': 0.00423728813559322, 'mean_word_length': 4.9789029535864975, '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': '2078124', 'n_tokens_mistral': 448, 'n_tokens_neox': 431, 'n_words': 82}