<commit_before>package io.logspace.system;

import static java.util.concurrent.TimeUnit.SECONDS;

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

import org.apache.commons.io.FileUtils;

import io.logspace.it.LogspaceTestException;

public class SystemTestUtils {

    public static void prepareDemoDirectory() {
        try {
            File directory = new File(System.getProperty("java.io.tmpdir"), "logspace-demo");
            directory.mkdirs();
            FileUtils.cleanDirectory(directory);
        } catch (IOException e) {
            throw new LogspaceTestException("Error while cleaning Logspace demo directory.", e);
        }
    }

    public static void sleep(long seconds) {
        try {
            SECONDS.sleep(seconds);
        } catch (InterruptedException e) {
            // ignore
        }
    }
}
<commit_msg>cleanDirectory can fail on Windows if there is an old process using a file under the directory<commit_after>package io.logspace.system;

import static java.util.concurrent.TimeUnit.SECONDS;

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

import org.apache.commons.io.FileUtils;

public class SystemTestUtils {

    public static void prepareDemoDirectory() {
        try {
            File directory = new File(System.getProperty("java.io.tmpdir"), "logspace-demo");
            directory.mkdirs();
            FileUtils.cleanDirectory(directory);
        } catch (IOException e) {
        	// do nothing (cleanDirectory may fail on Windows systems because the directory could be in use by an old process)
        }
    }

    public static void sleep(long seconds) {
        try {
            SECONDS.sleep(seconds);
        } catch (InterruptedException e) {
            // ignore
        }
    }
}

{'fraction_non_alphanumeric': 0.09221076746849943, 'fraction_numerical': 0.0, 'mean_word_length': 2.5364372469635628, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '7150517', 'n_tokens_mistral': 470, 'n_tokens_neox': 465, 'n_words': 126}