<commit_before>package net.orfjackal.pommac;

import java.io.*;
import java.util.Enumeration;
import java.util.zip.ZipEntry;
import java.util.zip.ZipFile;

/**
 * @author <NAME>
 * @since 29.2.2008
 */
public class Unpacker {

    public static void unpack(File archive, File toDir) {
        ZipFile zip = null;
        try {
            zip = new ZipFile(archive);
            for (Enumeration<? extends ZipEntry> entries = zip.entries(); entries.hasMoreElements();) {
                ZipEntry zipEntry = entries.nextElement();
                if (zipEntry.isDirectory()) {
                    writeDir(toDir, zipEntry);
                } else {
                    writeFile(toDir, zip, zipEntry);
                }
            }
        } catch (IOException e) {
            throw new RuntimeException("Unable to unpack: " + archive, e);
        } finally {
            close(zip);
        }<commit_msg>refactored<commit_after>package net.orfjackal.pommac;

import java.io.*;
import java.util.Enumeration;
import java.util.zip.ZipEntry;
import java.util.zip.ZipFile;

/**
 * @author <NAME>
 * @since 29.2.2008
 */
public final class Unpacker {

    private Unpacker() {
    }

    public static void unpack(File archive, File toDir) {
        ZipFile zip = null;
        try {
            zip = new ZipFile(archive);
            for (Enumeration<? extends ZipEntry> entries = zip.entries(); entries.hasMoreElements();) {
                ZipEntry zipEntry = entries.nextElement();
                if (zipEntry.isDirectory()) {
                    writeDir(toDir, zipEntry);
                } else {
                    writeFile(toDir, zip, zipEntry);
                }
            }
        } catch (IOException e) {
            throw new RuntimeException("Unable to unpack: " + archive, e);
        } finally {
            close(zip);
        }
{'fraction_non_alphanumeric': 0.11357490535424554, 'fraction_numerical': 0.0075716603569497025, 'mean_word_length': 1.8417818740399385, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '2395467', 'n_tokens_mistral': 546, 'n_tokens_neox': 503, 'n_words': 125}