<commit_before>package com.incquerylabs.iot.javatransmitter.runnables;

import java.util.concurrent.BlockingQueue;

import com.incquerylabs.iot.javatransmitter.data.InputParameters;
import com.incquerylabs.iot.javatransmitter.mqtt.Publisher;

public class MqttPublisherRunnable implements Runnable {

	protected BlockingQueue<String> queue = null;
    private boolean isRunning = true;
	private final Publisher publisher;
	private InputParameters parameters;

    public MqttPublisherRunnable(BlockingQueue<String> queue, InputParameters parameters) {
        this.queue = queue;
		this.parameters = parameters;
        publisher = new Publisher(parameters.broker, parameters.sensorID);
        publisher.connect();
    }

    @Override
	public void run() {
        try {
        	while(isRunning) {
        		String rawData = queue.take();
        		publisher.publish(parameters.topic, rawData);
        	}
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
    }
    
    public synchronized void finish(){
    	isRunning = false;
    }
}<commit_msg>Added debug message<commit_after>package com.incquerylabs.iot.javatransmitter.runnables;

import java.util.concurrent.BlockingQueue;

import com.incquerylabs.iot.javatransmitter.data.InputParameters;
import com.incquerylabs.iot.javatransmitter.mqtt.Publisher;

public class MqttPublisherRunnable implements Runnable {

	protected BlockingQueue<String> queue = null;
    private boolean isRunning = true;
	private final Publisher publisher;
	private InputParameters parameters;

    public MqttPublisherRunnable(BlockingQueue<String> queue, InputParameters parameters) {
        this.queue = queue;
		this.parameters = parameters;
        publisher = new Publisher(parameters.broker, parameters.sensorID);
        publisher.connect();
    }

    @Override
	public void run() {
        try {
        	System.out.println("Start sending messages...");
        	while(isRunning) {
        		String rawData = queue.take();
        		publisher.publish(parameters.topic, rawData);
        	}
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
    }
    
    public synchronized void finish(){
    	isRunning = false;
    }
}
{'fraction_non_alphanumeric': 0.08847184986595175, 'fraction_numerical': 0.0, 'mean_word_length': 3.2086466165413534, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '5569387', 'n_tokens_mistral': 651, 'n_tokens_neox': 623, 'n_words': 131}