<commit_before>package com.comandante.creeper;


import com.comandante.creeper.managers.GameManager;
import com.google.common.util.concurrent.AbstractIdleService;
import org.pircbotx.MultiBotManager;
import org.pircbotx.PircBotX;

public class IrcBotService extends AbstractIdleService {

    private final CreeperConfiguration creeperConfiguration;
    private final GameManager gameManager;
    private PircBotX bot;
    private org.pircbotx.Configuration configuration;
    MultiBotManager<PircBotX> manager;

    public IrcBotService(CreeperConfiguration creeperConfiguration, GameManager gameManager) {
        this.creeperConfiguration = creeperConfiguration;
        this.gameManager = gameManager;
    }

    @Override
    protected void startUp() throws Exception {
        manager = newBot();
        manager.start();
    }

    public MultiBotManager newBot() {
        manager = new MultiBotManager();
        configuration = new org.pircbotx.Configuration.Builder()
                .setName(creeperConfiguration.ircNickname)
                .setLogin(creeperConfiguration.ircUsername)
                .setServerHostname(creeperConfiguration.ircServer)
                .addAutoJoinChannel(creeperConfiguration.ircChannel)
                .addListener(new MyListener(gameManager, 376))
                .setVersion("Creeper MUD IRC But.")
                .buildConfiguration();
        bot = new PircBotX(configuration);
        // bot.startBot();
        manager.addBot(bot);
        return manager;
    }

    @Override
    protected void shutDown() throws Exception {
        bot.stopBotReconnect();
        manager.stopAndWait();
    }

    public PircBotX.State getState() {
        return bot.getState();
    }

    public PircBotX getBot() {
        return bot;
    }

    public MultiBotManager<PircBotX> getManager() {
        return manager;
    }

    public void setManager(MultiBotManager<PircBotX> manager) {
        this.manager = manager;
    }
}
<commit_msg>Auto reconnect, finally<commit_after>package com.comandante.creeper;


import com.comandante.creeper.managers.GameManager;
import com.google.common.util.concurrent.AbstractIdleService;
import org.pircbotx.MultiBotManager;
import org.pircbotx.PircBotX;

public class IrcBotService extends AbstractIdleService {

    private final CreeperConfiguration creeperConfiguration;
    private final GameManager gameManager;
    private PircBotX bot;
    private org.pircbotx.Configuration configuration;
    MultiBotManager<PircBotX> manager;

    public IrcBotService(CreeperConfiguration creeperConfiguration, GameManager gameManager) {
        this.creeperConfiguration = creeperConfiguration;
        this.gameManager = gameManager;
    }

    @Override
    protected void startUp() throws Exception {
        manager = newBot();
        manager.start();
    }

    public MultiBotManager newBot() {
        manager = new MultiBotManager();
        configuration = new org.pircbotx.Configuration.Builder()
                .setName(creeperConfiguration.ircNickname)
                .setLogin(creeperConfiguration.ircUsername)
                .setServerHostname(creeperConfiguration.ircServer)
                .addAutoJoinChannel(creeperConfiguration.ircChannel)
                .addListener(new MyListener(gameManager, 376))
                .setVersion("Creeper MUD IRC But.")
                .setAutoReconnect(true)
                .buildConfiguration();
        bot = new PircBotX(configuration);
        // bot.startBot();
        manager.addBot(bot);
        return manager;
    }

    @Override
    protected void shutDown() throws Exception {
        bot.stopBotReconnect();
        manager.stopAndWait();
    }

    public PircBotX.State getState() {
        return bot.getState();
    }

    public PircBotX getBot() {
        return bot;
    }

    public MultiBotManager<PircBotX> getManager() {
        return manager;
    }

    public void setManager(MultiBotManager<PircBotX> manager) {
        this.manager = manager;
    }
}

{'fraction_non_alphanumeric': 0.08159203980099503, 'fraction_numerical': 0.0014925373134328358, 'mean_word_length': 2.7898209236569276, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, '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': '6610630', 'n_tokens_mistral': 1154, 'n_tokens_neox': 1084, 'n_words': 215}