<commit_before>package com.zuehlke.carrera.javapilot.akka.rapidtweak.android;

import com.zuehlke.carrera.javapilot.akka.rapidtweak.android.messages.*;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.util.ArrayList;
import java.util.List;


public class MessageDispatcher implements AndroidAppWebSocketServer.MessageHandler {

    private final Logger LOGGER = LoggerFactory.getLogger(MessageDispatcher.class);
    private List<MessageEndpoint> endpoints = new ArrayList<>();
    private AndroidAppWebSocketServer androidAppWebSocketServer;

    public MessageDispatcher() {

    }


    public void addMessageEndpoint(MessageEndpoint endpoint) {
        endpoints.add(endpoint);
    }


    public void onMessage(String message) {

        String parts[] = message.split("|");
        if (parts.length == 2) {
            String className = parts[0];
            String data = parts[1];

            try {
                Class clazz = Class.forName(className);
                Serializator<Message> serializator = new Serializator<>();
                Message rawMessage = serializator.deserialize(data, clazz);
                dispatchMessge(rawMessage);

            } catch (ClassNotFoundException e) {
                e.printStackTrace();
                LOGGER.error(e.getMessage(), e);
            }
<commit_msg>Bug fix: split on pipe, has to be escaped<commit_after>package com.zuehlke.carrera.javapilot.akka.rapidtweak.android;

import com.zuehlke.carrera.javapilot.akka.rapidtweak.android.messages.*;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.util.ArrayList;
import java.util.List;


public class MessageDispatcher implements AndroidAppWebSocketServer.MessageHandler {

    private final Logger LOGGER = LoggerFactory.getLogger(MessageDispatcher.class);
    private List<MessageEndpoint> endpoints = new ArrayList<>();
    private AndroidAppWebSocketServer androidAppWebSocketServer;

    public MessageDispatcher() {

    }


    public void addMessageEndpoint(MessageEndpoint endpoint) {
        endpoints.add(endpoint);
    }


    public void onMessage(String message) {

        String parts[] = message.split("\\|");
        if (parts.length == 2) {
            String className = parts[0];
            String data = parts[1];

            try {
                Class clazz = Class.forName(className);
                Serializator<Message> serializator = new Serializator<>();
                Message rawMessage = serializator.deserialize(data, clazz);
                dispatchMessge(rawMessage);

            } catch (ClassNotFoundException e) {
                e.printStackTrace();
                LOGGER.error(e.getMessage(), e);
            }

{'fraction_non_alphanumeric': 0.09579955784819455, 'fraction_numerical': 0.0036845983787767134, 'mean_word_length': 2.8078541374474053, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, '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': '538604', 'n_tokens_mistral': 757, 'n_tokens_neox': 709, 'n_words': 152}