<commit_before>var db = require("./db");

var postVersion = function(req, res){
    if(process.env.npm_package_version){
	res.end(process.env.npm_package_version); // npm start
    }
    else {
	var pjson = require("./package.json");
	res.end(pjson.version); // node server.js
    }
};

var getUserID = function(req, res){
    var html = req.query.sourceurl,
	expname = req.query.experimentName;
    if(!html || !expname) {
	res.end("(0)");
    }
    else {
	db.getUserFileName(html, expname, function (ufn){
	    res.end("(\"" + ufn.toString() + "\")");
	});
    }
};

var routes = {
    "/version" : postVersion,
    "/getuserid" : getUserID
};



module.exports = function doRouting(server) {
    for(var path in routes){
	server.get(path, routes[path]);
    }
};<commit_msg>Those pesky "s<commit_after>var db = require("./db");

var postVersion = function(req, res){
    if(process.env.npm_package_version){
	res.end(process.env.npm_package_version); // npm start
    }
    else {
	var pjson = require("./package.json");
	res.end(pjson.version); // node server.js
    }
};

var getUserID = function(req, res){
    var html = req.query.sourceurl,
	expname = req.query.experimentName;
    if(!html || !expname) {
	res.end("(\"0\")");
    }
    else {
	db.getUserFileName(html, expname, function (ufn){
	    res.end("(\"" + ufn.toString() + "\")");
	});
    }
};

var routes = {
    "/version" : postVersion,
    "/getuserid" : getUserID
};



module.exports = function doRouting(server) {
    for(var path in routes){
	server.get(path, routes[path]);
    }
};
{'fraction_non_alphanumeric': 0.18770019218449713, 'fraction_numerical': 0.0012812299807815502, 'mean_word_length': 3.187667560321716, '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': '2710588', 'n_tokens_mistral': 577, 'n_tokens_neox': 566, 'n_words': 106}