<commit_before>package com.gmail.nossr50.skills.archery;

import java.util.HashMap;
import java.util.Map;
import java.util.Random;

import org.bukkit.Material;
import org.bukkit.entity.Entity;
import org.bukkit.entity.LivingEntity;
import org.bukkit.inventory.ItemStack;

import com.gmail.nossr50.util.Misc;

public class Archery {
    private static Random random = new Random();
    private static Map<LivingEntity, Integer> arrowTracker = new HashMap<LivingEntity, Integer>();

    public static final int ARROW_TRACKING_MAX_BONUS_LEVEL = 1000;

    public static final int BONUS_DAMAGE_INCREASE_LEVEL = 50;
    public static final double BONUS_DAMAGE_INCREASE_PERCENT = 0.1D;
    public static final double BONUS_DAMAGE_MAX_BONUS_PERCENTAGE = 2.0D;

    public static final int DAZE_MAX_BONUS_LEVEL = 1000;
    public static final int DAZE_MODIFIER = 4;

    protected static boolean arrowTrackerContains(LivingEntity livingEntity) {
        return arrowTracker.containsKey(livingEntity);
    }

    protected static void incrementTrackerValue(LivingEntity livingEntity) {
        arrowTracker.put(livingEntity, arrowTracker.get(livingEntity) + 1);
    }

    protected static void addToTracker(LivingEntity livingEntity) {
        arrowTracker.put(livingEntity, 1);
    }

    /**
     * Check for arrow retrieval.
     *
     * @param entity The entity hit by the arrows
     */
    public static void arrowRetrievalCheck(Entity entity) {
        Integer quantity = arrowTracker.remove(entity);

        if (quantity != null) {
            Misc.dropItems(entity.getLocation(), new ItemStack(Material.ARROW), quantity);
        }
    }

    protected static Random getRandom() {
        return random;
    }
}<commit_msg>Fixed killed entities not being removed from arrowTracker<commit_after>package com.gmail.nossr50.skills.archery;

import java.util.HashMap;
import java.util.Map;
import java.util.Random;

import org.bukkit.Material;
import org.bukkit.entity.Entity;
import org.bukkit.entity.LivingEntity;
import org.bukkit.inventory.ItemStack;

import com.gmail.nossr50.util.Misc;

public class Archery {
    private static Random random = new Random();
    private static Map<LivingEntity, Integer> arrowTracker = new HashMap<LivingEntity, Integer>();

    public static final int ARROW_TRACKING_MAX_BONUS_LEVEL = 1000;

    public static final int BONUS_DAMAGE_INCREASE_LEVEL = 50;
    public static final double BONUS_DAMAGE_INCREASE_PERCENT = 0.1D;
    public static final double BONUS_DAMAGE_MAX_BONUS_PERCENTAGE = 2.0D;

    public static final int DAZE_MAX_BONUS_LEVEL = 1000;
    public static final int DAZE_MODIFIER = 4;

    protected static boolean arrowTrackerContains(LivingEntity livingEntity) {
        return arrowTracker.containsKey(livingEntity);
    }

    protected static void incrementTrackerValue(LivingEntity livingEntity) {
        arrowTracker.put(livingEntity, arrowTracker.get(livingEntity) + 1);
    }

    protected static void addToTracker(LivingEntity livingEntity) {
        arrowTracker.put(livingEntity, 1);
    }

    /**
     * Check for arrow retrieval.
     *
     * @param entity The entity hit by the arrows
     */
    public static void arrowRetrievalCheck(Entity entity) {
        Integer quantity = arrowTracker.remove(entity);

        if (quantity != null) {
            Misc.dropItems(entity.getLocation(), new ItemStack(Material.ARROW), quantity);
            arrowTracker.remove(entity);
        }
    }

    protected static Random getRandom() {
        return random;
    }
}
{'fraction_non_alphanumeric': 0.07972858354537744, 'fraction_numerical': 0.011874469889737066, 'mean_word_length': 3.643044619422572, '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': '5934244', 'n_tokens_mistral': 1098, 'n_tokens_neox': 1020, 'n_words': 260}