<commit_before>/*
    @author <NAME>
    @component CoreHttp
*/

package.core.http = function CoreHttp(me) {
    var core = me.core;
    me.port = 8080;
    me.listeners = [];
    me.init = function() {
        if(me.platform === "server") {
            me.http = require("http");
            me.server = me.http.createServer(function(request, response) {
                var body = [];
                  request.on('error', function(err) {
                    console.error(err);
                  }).on('data', function(chunk) {
                    body.push(chunk);
                  }).on('end', function() {
                    body = Buffer.concat(body).toString();
                    var job = core.job.open();
                    var url = request.url;
                    var query = "";
                    var query_offset = url.lastIndexOf("?");
                    if(query_offset !== -1) {
                        url = request.url.substring(0, query_offset);
                        query = request.url.substring(query_offset+1);
                    }
                    var info = {<commit_msg>bug fixes<commit_after>/*
    @author <NAME>
    @component CoreHttp
*/

package.core.http = function CoreHttp(me) {
    var core = me.core;
    if(package.platform === "server") {
        me.port = process.env.PORT || 8080;
    }
    else {
        me.port = 80;
    }
    me.listeners = [];
    me.init = function() {
        if(me.platform === "server") {
            me.http = require("http");
            me.server = me.http.createServer(function(request, response) {
                var body = [];
                  request.on('error', function(err) {
                    console.error(err);
                  }).on('data', function(chunk) {
                    body.push(chunk);
                  }).on('end', function() {
                    body = Buffer.concat(body).toString();
                    var job = core.job.open();
                    var url = request.url;
                    var query = "";
                    var query_offset = url.lastIndexOf("?");
                    if(query_offset !== -1) {
                        url = request.url.substring(0, query_offset);
                        query = request.url.substring(query_offset+1);
                    }
                    var info = {
{'fraction_non_alphanumeric': 0.1378273937312151, 'fraction_numerical': 0.006869901245169601, 'mean_word_length': 1.2687439143135346, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '2330122', 'n_tokens_mistral': 637, 'n_tokens_neox': 595, 'n_words': 117}