<commit_before>package net.diluv.catalejo.minecraft.readers;

import java.util.HashSet;
import java.util.Map;
import java.util.Set;
import java.util.zip.ZipEntry;
import java.util.zip.ZipFile;

import com.diluv.catalejo.reader.MetadataReader;

public class ModTypeReader implements MetadataReader {

    public static final MetadataReader MOD_TYPE_READER = new ModTypeReader();

    @Override
    public void readArchiveEntry (Map<String, Object> metadata, ZipFile file, ZipEntry entry) {

        final String fileName = entry.getName();

        if ("mcmod.info".equals(fileName)) {
            this.setType(metadata, "forge");
        }
        else if ("litemod.json".equals(fileName)) {
            this.setType(metadata, "liteloader");
        }
        else if (fileName.startsWith("mod/mcreator/mcreator_")) {
            this.setType(metadata, "mcreator");
        }
    }

    private void setType (Map<String, Object> metadata, String type) {

        final Set<String> types = (Set<String>) metadata.getOrDefault("MCModTypes", new HashSet<String>());
        types.add(type);
        metadata.put("mcmodtypes", types);
    }
}<commit_msg>MCModTypes -> FileFlags<commit_after>package net.diluv.catalejo.minecraft.readers;

import java.util.HashSet;
import java.util.Map;
import java.util.Set;
import java.util.zip.ZipEntry;
import java.util.zip.ZipFile;

import com.diluv.catalejo.reader.MetadataReader;

public class ModTypeReader implements MetadataReader {

    public static final MetadataReader MOD_TYPE_READER = new ModTypeReader();

    @Override
    public void readArchiveEntry (Map<String, Object> metadata, ZipFile file, ZipEntry entry) {

        final String fileName = entry.getName();

        if ("mcmod.info".equals(fileName)) {
            this.setType(metadata, "forge");
        }
        else if ("litemod.json".equals(fileName)) {
            this.setType(metadata, "liteloader");
        }
        else if (fileName.startsWith("mod/mcreator/mcreator_")) {
            this.setType(metadata, "mcreator");
        }
    }

    private void setType (Map<String, Object> metadata, String type) {

        final Set<String> types = (Set<String>) metadata.getOrDefault("FileFlags", new HashSet<String>());
        types.add(type);
        metadata.put("FileFlags", types);
    }
}
{'fraction_non_alphanumeric': 0.12218370883882149, 'fraction_numerical': 0.0, 'mean_word_length': 3.244485294117647, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 14, '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': '2020190', 'n_tokens_mistral': 710, 'n_tokens_neox': 692, 'n_words': 147}