<commit_before>package fr.insee.rmes.api.utils;

import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.util.ArrayList;
import java.util.List;

import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;

public class FileUtils {
	
	private static Logger logger = LogManager.getLogger(FileUtils.class);

	public static List<List<String>> readFile(String pathFile, String csvSplitBy)  {
		List<String> allLines = null ;
        try {
			allLines = Files.readAllLines(Paths.get(pathFile));
		} catch (IOException e) {
				logger.error(e.getMessage());
		}
		
		List<List<String>> fileContents = new ArrayList<List<String>>();

		for (String line : allLines) {
			List<String> lineContents = new ArrayList<String>();
			String[] parts = line.split(csvSplitBy);
			for (int i = 0; i < parts.length; i++) {
				lineContents.add(parts[i]);
			}
			fileContents.add(lineContents);
		}
		return fileContents;
	}
}
<commit_msg>Avoid error if there is no exclusion file<commit_after>package fr.insee.rmes.api.utils;

import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.util.ArrayList;
import java.util.List;

import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;

public class FileUtils {
	
	private static Logger logger = LogManager.getLogger(FileUtils.class);

	public static List<List<String>> readFile(String pathFile, String csvSplitBy)  {
		List<String> allLines = null ;
		List<List<String>> fileContents = new ArrayList<List<String>>();
		
        try {
			allLines = Files.readAllLines(Paths.get(pathFile));
		} catch (IOException e) {
				logger.error(e.getMessage());
				return fileContents;
		}
		

		for (String line : allLines) {
			List<String> lineContents = new ArrayList<String>();
			String[] parts = line.split(csvSplitBy);
			for (int i = 0; i < parts.length; i++) {
				lineContents.add(parts[i]);
			}
			fileContents.add(lineContents);
		}
		return fileContents;
	}
}

{'fraction_non_alphanumeric': 0.13006923837784373, 'fraction_numerical': 0.002967359050445104, 'mean_word_length': 4.227390180878553, 'pattern_counts': {'":': 0, '<': 23, '<?xml version=': 0, '>': 21, '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': '5320459', 'n_tokens_mistral': 720, 'n_tokens_neox': 648, 'n_words': 143}