<commit_before>$(function() {
  // wire in to the socket
  var socket = io('http://localhost:3000');

  // chat related stuff
  var $messageList = $('#messages'),
    $messageForm = $('#message-form'),
    $messageInput = $('#message-input');

  var ENTER_KEY = 13;

  function messageFromServer (message, err) {
    var chatServer = '<dt class="chat-server">Chat Server:</dt>';
    $messageList.append(chatServer);
    if (err) {
      $messageList.append('<dd>' + message.message +
        ' See console for more details</dd>');
      console.log('Error Message: ' + message.err);
    } else {
      $messageList.append('<dd>' + message.message + '</dd>');
    }
  };

  function messageFromUser(message) {
    var user = '<dt>A User:</dt>';
    $messageList.append(user);
    $messageList.append('<dd>' + message + '</dd>');
  }

  function sendMessage(message) {
    var user = '<dt class="me">Me</dt>';
    $messageList.append(user);
    $messageList.append('<dd>' + message + '</dd>');
    socket.emit('chat', {message: message});
  }

  // handle some events
  socket.on('connect', function() {
    var message = '<dt>Now Connected!</dt><dd></dt>';
    $messageList.append(message);

    socket.on('chat', function(data) {
      messageFromUser(data);
    });

    socket.on('server', function(data) {
      messageFromServer(data);
    });
  });

  socket.on('disconnect', function() {
    var message = "Disconnected";<commit_msg>Fix 'disconnect' Event Handler Message<commit_after>$(function() {
  // wire in to the socket
  var socket = io('http://localhost:3000');

  // chat related stuff
  var $messageList = $('#messages'),
    $messageForm = $('#message-form'),
    $messageInput = $('#message-input');

  var ENTER_KEY = 13;

  function messageFromServer (message, err) {
    var chatServer = '<dt class="chat-server">Chat Server:</dt>';
    $messageList.append(chatServer);
    if (err) {
      $messageList.append('<dd>' + message.message +
        ' See console for more details</dd>');
      console.log('Error Message: ' + message.err);
    } else {
      $messageList.append('<dd>' + message.message + '</dd>');
    }
  };

  function messageFromUser(message) {
    var user = '<dt>A User:</dt>';
    $messageList.append(user);
    $messageList.append('<dd>' + message + '</dd>');
  }

  function sendMessage(message) {
    var user = '<dt class="me">Me</dt>';
    $messageList.append(user);
    $messageList.append('<dd>' + message + '</dd>');
    socket.emit('chat', {message: message});
  }

  // handle some events
  socket.on('connect', function() {
    var message = '<dt>Now Connected!</dt><dd></dt>';
    $messageList.append(message);

    socket.on('chat', function(data) {
      messageFromUser(data);
    });

    socket.on('server', function(data) {
      messageFromServer(data);
    });
  });

  socket.on('disconnect', function() {
    var message = {message: "Disconnected"};
{'fraction_non_alphanumeric': 0.19526424159231298, 'fraction_numerical': 0.004118050789293068, 'mean_word_length': 3.3637724550898205, 'pattern_counts': {'":': 0, '<': 39, '<?xml version=': 0, '>': 39, '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': '5196037', 'n_tokens_mistral': 921, 'n_tokens_neox': 890, 'n_words': 188}