<commit_before>var http = require("http");
var url = require("url");

// anonymous function is used by default as first and only parameter of createServer()
http.createServer(function(request, response) {
    response.writeHead(200, {"Content-Type": "text/plain"});
    response.write("Hello World");
    response.end();
}).listen(8888);
<commit_msg>assign function to var<commit_after>var http = require("http");
var url = require("url");

// // anonymous function is used by default as first and only parameter of createServer()
// http.createServer(function(request, response) {
//     response.writeHead(200, {"Content-Type": "text/plain"});
//     response.write("Hello World");
//     response.end();
// }).listen(8888);
//
// // it can be assigned to var and var can be passed to createServer()
var onRequest = function(request, response) {
    response.writeHead(200, {"Content-Type": "text/plain"});
    response.write("Hello World");
    response.end();
}; // NB! must terminate assignment operation, yay @ IDEA
http.createServer(onRequest).listen(8888);

console.log("Server has started");

{'fraction_non_alphanumeric': 0.16257947320617622, 'fraction_numerical': 0.01907356948228883, 'mean_word_length': 4.482587064676617, 'pattern_counts': {'":': 3, '<': 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': '4518017', 'n_tokens_mistral': 325, 'n_tokens_neox': 306, 'n_words': 93}