<commit_before>package fr.insee.eno;

import java.io.File;

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

import com.google.inject.Guice;
import com.google.inject.Injector;

/**
 * Only for dev purposes.
 * */
public class DummyMain {
	
	private static final Logger logger = LogManager.getLogger(DummyMain.class);

	public static void main(String[] args) {
		logger.info("Starting generation program");
		Injector injector = Guice.createInjector(new DDI2FRContext());
		GenerationService service = injector.getInstance(GenerationService.class);
		try {
			File generatedFile = service.generateQuestionnaire(
					new File("questionnaires/simpsons/ddi/simpsons.xml"),
					null);
			logger.info("Generation successful! >> " + generatedFile);
		} catch (Exception e) {
			logger.error(e.getMessage());
		}
	}

}<commit_msg>Adding a method to clean the temporary directory<commit_after>package fr.insee.eno;

import java.io.File;
import java.io.IOException;

import org.apache.commons.io.FileUtils;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;

import com.google.inject.Guice;
import com.google.inject.Injector;

/**
 * Only for dev purposes.
 * */
public class DummyMain {
	
	private static final Logger logger = LogManager.getLogger(DummyMain.class);

	public static void main(String[] args) {
		logger.info("Starting generation program");
		cleanTempDirectory();		
		Injector injector = Guice.createInjector(new DDI2FRContext());
		GenerationService service = injector.getInstance(GenerationService.class);
		try {
			File generatedFile = service.generateQuestionnaire(
					new File("questionnaires/simpsons/ddi/simpsons.xml"),
					null);
			logger.info("Generation successful! >> " + generatedFile);
		} catch (Exception e) {
			logger.error(e.getMessage());
		}
	}
	
	private static boolean cleanTempDirectory() {
		logger.debug("Cleaning temp directory at " + Constants.TEMP_FOLDER);
		File tempDir = new File(Constants.TEMP_FOLDER);
		if(!tempDir.exists()) {
			logger.debug("Temp dir does not exist.");
			return false;
		}
		try {
			FileUtils.forceMkdir(tempDir);
			FileUtils.cleanDirectory(tempDir);
			return true;
		} catch (IOException e) {
			logger.error(e.getMessage());
			return false;
		}
		
	}

}
{'fraction_non_alphanumeric': 0.12069716775599129, 'fraction_numerical': 0.00261437908496732, 'mean_word_length': 4.466666666666667, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, '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': '5514341', 'n_tokens_mistral': 779, 'n_tokens_neox': 712, 'n_words': 152}