<commit_before>var express = require('express'),
    http = require('http'),
    app = express(),
    server = http.createServer(app),
    io = require('socket.io').listen(server);

var sockets = {};

io.on('connection', function (socket) {
    console.log("We have a connection! Socket ID: " + socket.id);
    for (var k in sockets) {
        var s = sockets[k];
        s.disconnect();
        delete sockets[k];
    }
    sockets[socket.id] = socket;
    socket.emit('data', {"Notice": "New Socket.IO connection. ID = " + socket.id});
});
io.on('blah', function (data) {
    console.log("Got blah: " + data);
})

app.configure(function () {
    app.use(express.static(__dirname + '/public'));
    app.use(express.logger('dev'));
    app.use(express.bodyParser());
});

app.put('/push/:id', function (req, res) {
    console.log("PUT to /push/" + req.params.id);
    var id = req.params.id;
    if (sockets[id]) {
        sockets[id].emit('data', req.body);
        res.send("OK");
    } else {
        res.status(404).send("Session ID not found");
    }
});

var port = process.env.PORT || 3000;
server.listen(port);
console.log("Server running on port " + port);<commit_msg>JSON objects are key:value, let's exploit this fact<commit_after>var express = require('express'),
    http = require('http'),
    app = express(),
    server = http.createServer(app),
    io = require('socket.io').listen(server);

var sockets = {};

io.on('connection', function (socket) {
    console.log("We have a connection! Socket ID: " + socket.id);
    for (var k in sockets) {
        var s = sockets[k];
        s.disconnect();
        delete sockets[k];
    }
    sockets[socket.id] = socket;
    socket.emit('data', {
		"Notice": "New Socket.IO connection.",
		"ID": socket.id
	});
});

io.on('blah', function (data) {
    console.log("Got blah: " + data);
})

app.configure(function () {
    app.use(express.static(__dirname + '/public'));
    app.use(express.logger('dev'));
    app.use(express.bodyParser());
});

app.put('/push/:id', function (req, res) {
    console.log("PUT to /push/" + req.params.id);
    var id = req.params.id;
    if (sockets[id]) {
        sockets[id].emit('data', req.body);
        res.send("OK");
    } else {
        res.status(404).send("Session ID not found");
    }
});

var port = process.env.PORT || 3000;
server.listen(port);
console.log("Server running on port " + port);
{'fraction_non_alphanumeric': 0.19450229071220324, 'fraction_numerical': 0.0058309037900874635, 'mean_word_length': 3.0780984719864177, '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': '4275903', 'n_tokens_mistral': 819, 'n_tokens_neox': 790, 'n_words': 176}