<commit_before>package org.nanobot

class BotManager {
    def ArrayList<NanoBot> bots = []

    def addBot(server, port, nick) {
        def bot = new NanoBot(server, port, nick)
        bots.add(bot)
        return bot
    }

    def cloneBot(NanoBot original, nickname) {
        def bot = addBot(original.server, original.port, nickname)
        bot.handlers = original.handlers
        bot.userName = original.userName
        bot.realName = original.realName
        bot.commandPrefix = original.commandPrefix
        return bot
    }

    def connectAll() {
        bots.each {
            it.connect()
            sleep(200) // In case people abuse, it at least isn't instant.
        }
    }

    def on(String name, Closure closure) {
        bots.each {
            it.on(name, closure)
        }
    }

    def join(channel) {<commit_msg>Fixed how BotManager clones a bot.<commit_after>package org.nanobot

class BotManager {
    def ArrayList<NanoBot> bots = []

    def addBot(server, port, nick) {
        def bot = new NanoBot(server, port, nick)
        bots.add(bot)
        return bot
    }

    def cloneBot(NanoBot original, nickname) {
        def bot = addBot(original.server, original.port, nickname)
        bot.handlers.putAll(original.handlers)
        bot.userName = original.userName
        bot.realName = original.realName
        bot.commandPrefix = original.commandPrefix
        return bot
    }

    def connectAll() {
        bots.each {
            it.connect()
            sleep(200) // In case people abuse, it at least isn't instant.
        }
    }

    def on(String name, Closure closure) {
        bots.each {
            it.on(name, closure)
        }
    }

    def join(channel) {
{'fraction_non_alphanumeric': 0.09438332368268675, 'fraction_numerical': 0.003474232773595831, 'mean_word_length': 1.9488054607508531, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '3739761', 'n_tokens_mistral': 534, 'n_tokens_neox': 508, 'n_words': 130}