<commit_before>package com.github.yannicklamprecht.worldborder.plugin;

import com.github.yannicklamprecht.worldborder.api.BorderAPI;
import com.github.yannicklamprecht.worldborder.api.WorldBorderApi;
import com.github.yannicklamprecht.worldborder.api.WorldBorderApiImpl;
import org.bukkit.Bukkit;
import org.bukkit.plugin.java.JavaPlugin;

/**
 * Created by ysl3000
 */
public class WorldBorderPlugin extends JavaPlugin {

    @Override
    public void onEnable() {

        WorldBorderApiImpl worldBorderApi;
        boolean supportsPersistence = false;

        String version = Bukkit.getServer().getClass().getPackage().getName().replace('.', ',').split(",")[3];
        System.out.println("Version: " + version);
        switch (version) {
            case "v1_13_R2":
                worldBorderApi = new com.github.yannicklamprecht.worldborder.v1_13_R2.Impl();
                break;
            case "v1_14_R1":
                worldBorderApi = new com.github.yannicklamprecht.worldborder.v1_14_R1.Impl();
                supportsPersistence = true;
                break;
            case "v1_15_R1":
                worldBorderApi = new com.github.yannicklamprecht.worldborder.v1_15_R1.Impl();
                supportsPersistence = true;
                break;
            default: {
                getLogger().info("Unsupported version of Minecraft");
                Bukkit.getPluginManager().disablePlugin(this);
                return;
            }
        }
        BorderAPI.setWorldBorderApi(wrapPersistence(worldBorderApi, supportsPersistence));
    }

    private WorldBorderApi wrapPersistence(WorldBorderApiImpl worldBorderApi, boolean supportsPersistence) {
        if(supportsPersistence){
            return new PersistenceWrapper(this, worldBorderApi);
        }
        return worldBorderApi;
    }
}<commit_msg>Cleanup<commit_after>package com.github.yannicklamprecht.worldborder.plugin;

import com.github.yannicklamprecht.worldborder.api.BorderAPI;
import com.github.yannicklamprecht.worldborder.api.WorldBorderApi;
import org.bukkit.Bukkit;
import org.bukkit.plugin.java.JavaPlugin;

/**
 * Created by ysl3000
 */
public class WorldBorderPlugin extends JavaPlugin {

    @Override
    public void onEnable() {

        WorldBorderApi worldBorderApi;

        String version = Bukkit.getServer().getClass().getPackage().getName().replace('.', ',').split(",")[3];
        System.out.println("Version: " + version);
        switch (version) {
            case "v1_13_R2":
                worldBorderApi = new com.github.yannicklamprecht.worldborder.v1_13_R2.Impl();
                break;
            case "v1_14_R1":
                worldBorderApi = new PersistenceWrapper(this, new com.github.yannicklamprecht.worldborder.v1_14_R1.Impl());
                break;
            case "v1_15_R1":
                worldBorderApi = new PersistenceWrapper(this, new com.github.yannicklamprecht.worldborder.v1_15_R1.Impl());
                break;
            default: {
                getLogger().info("Unsupported version of Minecraft");
                Bukkit.getPluginManager().disablePlugin(this);
                return;
            }
        }
        BorderAPI.setWorldBorderApi(worldBorderApi);
    }

}
{'fraction_non_alphanumeric': 0.10290482076637825, 'fraction_numerical': 0.01792336217552534, 'mean_word_length': 2.537704918032787, 'pattern_counts': {'":': 6, '<': 3, '<?xml version=': 0, '>': 3, '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': '3442210', 'n_tokens_mistral': 971, 'n_tokens_neox': 924, 'n_words': 143}