<commit_before>package com.github.otbproject.otbproject.util;

import com.github.otbproject.otbproject.App;
import net.lingala.zip4j.core.ZipFile;
import net.lingala.zip4j.exception.ZipException;
import net.lingala.zip4j.model.FileHeader;


import java.io.*;
import java.net.URISyntaxException;
import java.util.List;

public class UnPacker {

    public static void unPack(String dir, String destDir){
        try {
            ZipFile jar = new ZipFile(new File(App.class.getProtectionDomain().getCodeSource().getLocation().toURI()));
            List<FileHeader> fileHeaders = jar.getFileHeaders();
            for (FileHeader fileHeader : fileHeaders){
                if(fileHeader.getFileName().startsWith(dir)) {
                    if(!fileHeader.isDirectory()) {
                        App.logger.debug(fileHeader.getFileName());
                        jar.extractFile(fileHeader, destDir, null, fileHeader.getFileName().substring(dir.length()));
                    }
                }
            }
        } catch (URISyntaxException | ZipException e) {
            App.logger.catching(e);
        }

    }
}<commit_msg>Suppressed unchecked warning and cleaned up for loop in UnPacker<commit_after>package com.github.otbproject.otbproject.util;

import com.github.otbproject.otbproject.App;
import net.lingala.zip4j.core.ZipFile;
import net.lingala.zip4j.exception.ZipException;
import net.lingala.zip4j.model.FileHeader;

import java.io.File;
import java.net.URISyntaxException;
import java.util.List;

public class UnPacker {

    public static void unPack(String dir, String destDir){
        try {
            ZipFile jar = new ZipFile(new File(App.class.getProtectionDomain().getCodeSource().getLocation().toURI()));
            @SuppressWarnings("unchecked")
            List<FileHeader> fileHeaders = jar.getFileHeaders();
            for (FileHeader fileHeader : fileHeaders){
                if(fileHeader.getFileName().startsWith(dir) && !fileHeader.isDirectory()) {
                    App.logger.debug(fileHeader.getFileName());
                    jar.extractFile(fileHeader, destDir, null, fileHeader.getFileName().substring(dir.length()));
                }
            }
        } catch (URISyntaxException | ZipException e) {
            App.logger.catching(e);
        }

    }
}
{'fraction_non_alphanumeric': 0.11337083513630462, 'fraction_numerical': 0.0025962786672436176, 'mean_word_length': 2.675675675675676, 'pattern_counts': {'":': 0, '<': 5, '<?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': '6647396', 'n_tokens_mistral': 672, 'n_tokens_neox': 649, 'n_words': 112}