<commit_before>package oncue.common.messages;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Iterator;
import java.util.List;

/**
 * A scheduler will send this message in response to a simple job summary
 * request.
 */
public class JobSummary implements Serializable {

	private static final long serialVersionUID = 8252819036997216081L;

	private List<Job> jobs = new ArrayList<>();

	/**
	 * empty constructor required for JSON mapping
	 */
	public JobSummary() {
	}

	public JobSummary(Collection<Job> jobs) {
		super();
		for (Job job : jobs) {
			this.jobs.add((Job) job.clone());
		}
	}

	public List<Job> getJobs() {
		return jobs;
	}

	@Override
	public String toString() {
		StringBuilder builder = new StringBuilder();
		Iterator<Job> iterator = jobs.iterator();
		while (iterator.hasNext()) {
			Job job = iterator.next();
			builder.append(job.toString());
			if (iterator.hasNext())
				builder.append("|");
		}
		return builder.toString();
	}
}
<commit_msg>Prefer joiner to custom joining<commit_after>package oncue.common.messages;

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

import com.google.common.base.Joiner;

/**
 * A scheduler will send this message in response to a simple job summary
 * request.
 */
public class JobSummary implements Serializable {

	private static final long serialVersionUID = 8252819036997216081L;

	private List<Job> jobs = new ArrayList<>();

	/**
	 * empty constructor required for JSON mapping
	 */
	public JobSummary() {
	}

	public JobSummary(Collection<Job> jobs) {
		super();
		for (Job job : jobs) {
			this.jobs.add((Job) job.clone());
		}
	}

	public List<Job> getJobs() {
		return jobs;
	}

	@Override
	public String toString() {
		return Joiner.on('|').join(jobs).toString();
	}
}

{'fraction_non_alphanumeric': 0.1260053619302949, 'fraction_numerical': 0.02037533512064343, 'mean_word_length': 4.084468664850136, 'pattern_counts': {'":': 0, '<': 12, '<?xml version=': 0, '>': 12, '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': '3871797', 'n_tokens_mistral': 640, 'n_tokens_neox': 571, 'n_words': 162}