<commit_before>package innovimax.mixthem.operation;

import innovimax.mixthem.MixException;
import innovimax.mixthem.arguments.RuleParam;
import innovimax.mixthem.arguments.ParamValue;

import java.util.List;
import java.util.Map;

/**
* <p>Zips two or more lines.</p>
* <p>Zipping stops when a line is missing.</p>
* @see ILineOperation
* @author Innovimax
* @version 1.0
*/
public class DefaultLineZipping extends AbstractLineOperation {
	
	protected final String sep;
	
	/**
	* Constructor
 	* @param params The list of parameters (maybe empty)
	* @see innovimax.mixthem.arguments.RuleParam
	* @see innovimax.mixthem.arguments.ParamValue
	*/
	public DefaultLineZipping(final Map<RuleParam, ParamValue> params) {
		super(params);
		this.sep = params.getOrDefault(RuleParam.ZIP_SEP, ZipOperation.DEFAULT_ZIP_SEPARATOR.getValue()).asString();	
	}
	
	@Override
	public void process(final List<String> lineRange, final LineResult result) throws MixException {
		result.reset();
		//System.out.println("RANGE="+lineRange.toString());		
		StringBuilder zip = new StringBuilder();
		int index = 0;
		for (String line : lineRange) {
			if (index > 0) {
				zip.append(this.sep);
			}
			zip.append(line);
			index++;<commit_msg>Update DefaultLineZipping.java<commit_after>package innovimax.mixthem.operation;

import innovimax.mixthem.MixException;
import innovimax.mixthem.arguments.RuleParam;
import innovimax.mixthem.arguments.ParamValue;

import java.util.List;
import java.util.Map;

/**
* <p>Zips two or more lines.</p>
* @see ILineOperation
* @author Innovimax
* @version 1.0
*/
public class DefaultLineZipping extends AbstractLineOperation {
	
	protected final String sep;
	
	/**
	* Constructor
 	* @param params The list of parameters (maybe empty)
	* @see innovimax.mixthem.arguments.RuleParam
	* @see innovimax.mixthem.arguments.ParamValue
	*/
	public DefaultLineZipping(final Map<RuleParam, ParamValue> params) {
		super(params);
		this.sep = params.getOrDefault(RuleParam.ZIP_SEP, ZipOperation.DEFAULT_ZIP_SEPARATOR.getValue()).asString();	
	}
	
	@Override
	public void process(final List<String> lineRange, final LineResult result) throws MixException {
		result.reset();
		//System.out.println("RANGE="+lineRange.toString());		
		StringBuilder zip = new StringBuilder();
		int index = 0;
		for (String line : lineRange) {
			if (index > 0) {
				zip.append(this.sep);
			}
			zip.append(line);
			index++;
{'fraction_non_alphanumeric': 0.12013256006628004, 'fraction_numerical': 0.0033140016570008283, 'mean_word_length': 4.763723150357995, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 15, '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': '532565', 'n_tokens_mistral': 837, 'n_tokens_neox': 782, 'n_words': 175}