<commit_before>package fr.aumgn.tobenamed.stage;

import java.util.Collection;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.block.Block;
import org.bukkit.block.BlockFace;
import org.bukkit.entity.Player;
import org.bukkit.event.Listener;
import org.bukkit.potion.PotionEffect;

import fr.aumgn.tobenamed.game.Game;
import fr.aumgn.tobenamed.game.Team;
import fr.aumgn.tobenamed.stage.listeners.StaticListener;

public class StaticStage extends Stage {

    public static class PlayerStatus {

        private Location location;
        private Material material;
        private byte data;
        private Collection<PotionEffect> potionEffects;

        public PlayerStatus(Player player) {
            Location loc = player.getLocation();
            location = new Location(loc.getWorld(), loc.getBlockX() + 0.5, 
                    loc.getBlockY(), loc.getBlockZ() + 0.5,
                    loc.getYaw(), loc.getPitch());
            Block block = location.getBlock().getRelative(BlockFace.DOWN);
            material = block.getType();
            data = block.getData();
            block.setType(Material.GLASS);
            restorePosition(player);

            this.potionEffects = player.getActivePotionEffects();
            for (PotionEffect activeEffect : potionEffects) {
                player.removePotionEffect(activeEffect.getType());
            }
        }

        public void restorePosition(Player player) {
            player.teleport(location);
        }

        public void restore(Player player) {
            Block block = location.getBlock().getRelative(BlockFace.DOWN);
            block.setTypeIdAndData(material.getId(), data, true);

            for (PotionEffect potionEffect : potionEffects) {
                player.addPotionEffect(potionEffect, true);
            }
        }
    }

    protected Game game;
    private StaticListener listener;
    private long time;
    private Map<Player, PlayerStatus> status;

    public StaticStage(Game game) {
        this.game = game;
        this.listener = new StaticListener(this);
        this.status = new HashMap<Player, PlayerStatus>();
    }

    @Override
    public List<Listener> getListeners() {
        return Collections.<Listener>singletonList(listener);
    }

    @Override<commit_msg>Add some attributes to PlayerStatus<commit_after>package fr.aumgn.tobenamed.stage;

import java.util.Collection;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.block.Block;
import org.bukkit.block.BlockFace;
import org.bukkit.entity.Player;
import org.bukkit.event.Listener;
import org.bukkit.potion.PotionEffect;

import fr.aumgn.tobenamed.game.Game;
import fr.aumgn.tobenamed.game.Team;
import fr.aumgn.tobenamed.stage.listeners.StaticListener;

public class StaticStage extends Stage {

    public static class PlayerStatus {

        private Location location;
        private Material material;
        private byte data;
        private Collection<PotionEffect> potionEffects;
        private float fallDistance;
        private int remainingAir;
        private int fireTicks;

        public PlayerStatus(Player player) {
            Location loc = player.getLocation();
            location = new Location(loc.getWorld(), loc.getBlockX() + 0.5, 
                    loc.getBlockY(), loc.getBlockZ() + 0.5,
                    loc.getYaw(), loc.getPitch());
            Block block = location.getBlock().getRelative(BlockFace.DOWN);
            material = block.getType();
            data = block.getData();
            block.setType(Material.GLASS);
            restorePosition(player);

            this.potionEffects = player.getActivePotionEffects();
            for (PotionEffect activeEffect : potionEffects) {
                player.removePotionEffect(activeEffect.getType());
            }

            this.fallDistance = player.getFallDistance();
            this.remainingAir = player.getRemainingAir();
            this.fireTicks = player.getFireTicks();
        }

        public void restorePosition(Player player) {
            player.teleport(location);
        }

        public void restore(Player player) {
            Block block = location.getBlock().getRelative(BlockFace.DOWN);
            block.setTypeIdAndData(material.getId(), data, true);

            for (PotionEffect potionEffect : potionEffects) {
                player.addPotionEffect(potionEffect, true);
            }

            player.setFallDistance(fallDistance);
            player.setRemainingAir(remainingAir);
            player.setFireTicks(fireTicks);
        }
    }

    protected Game game;
    private StaticListener listener;
    private long time;
    private Map<Player, PlayerStatus> status;

    public StaticStage(Game game) {
        this.game = game;
        this.listener = new StaticListener(this);
        this.status = new HashMap<Player, PlayerStatus>();
    }

    @Override
    public List<Listener> getListeners() {
        return Collections.<Listener>singletonList(listener);
    }

    @Override
{'fraction_non_alphanumeric': 0.09698234959195293, 'fraction_numerical': 0.0015183146707155057, 'mean_word_length': 2.5680433310765065, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, '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': '10650', 'n_tokens_mistral': 1454, 'n_tokens_neox': 1413, 'n_words': 297}