<commit_before>package org.myrobotlab.framework;

import java.io.Serializable;
import java.util.ArrayList;

import org.myrobotlab.service.interfaces.Invoker;

/**
 * Simple class representing an operating system process
 * 
 * @author GroG
 *
 */
public class ProcessData implements Serializable {
	private static final long serialVersionUID = 1L;

	public String branch;
	public String name;
	public String version;
	public Long startTs = null;
	public Long stopTs = null;
	boolean isRunning = false;
	ArrayList<String> cmdLine = null;

	transient public Process process;
	transient Monitor monitor;
	transient public Invoker service;

	public boolean autoUpdate = false;

	public static class Monitor extends Thread {
		ProcessData data;

		public Monitor(ProcessData data) {
			this.data = data;
		}

		@Override
		public void run() {
			try {
				if (data.process != null) {
					data.isRunning = true;
					data.process.waitFor();
				}
			} catch (Exception e) {
			}

			// FIXME - invoke("terminatedProcess(name))
			data.service.invoke("publishTerminated", data.name);
			data.isRunning = false;
		}

	}


	public ProcessData(Invoker service, String branch, String name, ArrayList<String> cmdLine, Process process) {
		this.service = service;
		this.name = name;
		this.branch = branch;
		this.process = process;
		this.cmdLine = cmdLine;
		this.startTs = System.currentTimeMillis();
		monitor = new Monitor(this);
		monitor.start();
	}

}
<commit_msg>fixed build - checked in dependent changes from Agent<commit_after>package org.myrobotlab.framework;

import java.io.Serializable;
import java.util.ArrayList;

import org.myrobotlab.service.interfaces.Invoker;

/**
 * Simple class representing an operating system process
 * 
 * @author GroG
 *
 */
public class ProcessData implements Serializable {
	private static final long serialVersionUID = 1L;

	public String branch;
	public String name;
	public String version;
	public Long startTs = null;
	public Long stopTs = null;
	public boolean isRunning = false;
	public String state = null; // running | stopped | unknown | non responsive
	public ArrayList<String> cmdLine = null;

	transient public Process process;
	transient Monitor monitor;
	transient public Invoker service;

	public boolean autoUpdate = false;

	public static class Monitor extends Thread {
		ProcessData data;

		public Monitor(ProcessData data) {
			this.data = data;
		}

		@Override
		public void run() {
			try {
				if (data.process != null) {
					data.isRunning = true;
					data.state = "running";
					data.process.waitFor();
				}
			} catch (Exception e) {
			}

			// FIXME - invoke("terminatedProcess(name))
			data.service.invoke("publishTerminated", data.name);
			data.isRunning = false;
			data.state = "stopped";
		}

	}


	public ProcessData(Invoker service, String branch, String version, String name, ArrayList<String> cmdLine, Process process) {
		this.service = service;
		this.name = name;
		this.branch = branch;
		this.version = version;
		this.process = process;
		this.cmdLine = cmdLine;
		this.startTs = System.currentTimeMillis();
		monitor = new Monitor(this);
		monitor.start();
	}

}

{'fraction_non_alphanumeric': 0.09838146620120597, 'fraction_numerical': 0.0006347191367819739, 'mean_word_length': 3.797564687975647, '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': '1682093', 'n_tokens_mistral': 1042, 'n_tokens_neox': 923, 'n_words': 278}