<commit_before>package ca.concordia.cssanalyser.io;

public class CSVColumns {
	
	private static String SEPARATOR = "|";
	
	private final String[] columns;
	
	public CSVColumns(String... columns) {
		this.columns = columns;
	}
	
	public void setSeparator(String separator) {
		SEPARATOR = separator;
	}

	public String getHeader(boolean addLineSeparator) {
		StringBuilder toReturn = new StringBuilder();
		for (int i = 0; i < columns.length; i++) {
			toReturn.append(columns[i]);
			if (i < columns.length - 1) {
				toReturn.append(SEPARATOR);
			} else { 
				if (addLineSeparator) {
					toReturn.append(System.lineSeparator());
				}
			}
		}
		return toReturn.toString();
	}
	
	public String getRowFormat(boolean addLineSeparator) {
		StringBuilder toReturn = new StringBuilder();
		for (int i = 0; i < columns.length; i++) {
			toReturn.append("%s");
			if (i < columns.length - 1) {
				toReturn.append(SEPARATOR);
			} else { 
				if (addLineSeparator) {
					toReturn.append(System.lineSeparator());
				}
			}
		}
		return toReturn.toString();
	}
	
}
<commit_msg>Changed CSVColumns to accept different separators<commit_after>package ca.concordia.cssanalyser.io;

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

public class CSVColumns {
	
	private String separator = "|";
	
	private final List<String> columns;
	
	public CSVColumns(String... columns) {
		this.columns = new ArrayList<>();
		for (String column : columns) {
			this.columns.add(column);
		}
	}
	
	public void setSeparator(String separator) {
		this.separator = separator;
	}
	
	public String getSeparator() {
		return this.separator;
	}
	
	public void addColumn(String columnName) {
		this.columns.add(columnName);
	}

	public String getHeader(boolean addLineSeparator) {
		StringBuilder toReturn = new StringBuilder();
		for (int i = 0; i < columns.size(); i++) {
			toReturn.append(columns.get(i));
			if (i < columns.size() - 1) {
				toReturn.append(this.separator);
			} else { 
				if (addLineSeparator) {
					toReturn.append(System.lineSeparator());
				}
			}
		}
		return toReturn.toString();
	}
	
	public String getRowFormat(boolean addLineSeparator) {
		StringBuilder toReturn = new StringBuilder();
		for (int i = 0; i < columns.size(); i++) {
			toReturn.append("%s");
			if (i < columns.size() - 1) {
				toReturn.append(separator);
			} else { 
				if (addLineSeparator) {
					toReturn.append(System.lineSeparator());
				}
			}
		}
		return toReturn.toString();
	}
	
}

{'fraction_non_alphanumeric': 0.1320372620494127, 'fraction_numerical': 0.0032401782098015392, 'mean_word_length': 3.4584837545126352, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 5, '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': '2649799', 'n_tokens_mistral': 936, 'n_tokens_neox': 792, 'n_words': 180}