<commit_before>var creep_supplier = {

    /** @param {Creep} creep **/
    run: function(creep) {
        if (creep.ticksToLive <= creep.memory.deathWarn && creep.memory.priority != 'supplierNearDeath') {
            creep.memory.priority = 'supplierNearDeath';
        }

        if (!creep.memory.atSpot && Game.flags[creep.room.name + "Supply"] && (creep.pos.x != Game.flags[creep.room.name + "Supply"].pos.x || creep.pos.y != Game.flags[creep.room.name + "Supply"].pos.y)) {
            creep.travelTo(Game.flags[creep.room.name + "Supply"]);
        } else if (_.sum(creep.carry) == 0) {
            creep.memory.atSpot = true;
            //Get from storage
            var storageTarget = creep.room.storage;
            if (storageTarget) {
                if (creep.withdraw(storageTarget, RESOURCE_ENERGY) == ERR_NOT_IN_RANGE) {
                    creep.travelTo(storageTarget);
                }
            }
        } else if (Memory.towerNeedEnergy[creep.room.name].length) {
            var target = Game.getObjectById(Memory.towerNeedEnergy[creep.room.name][0]);
            if (target) {
                if (creep.transfer(target, RESOURCE_ENERGY) == ERR_NOT_IN_RANGE) {
                    creep.travelTo(target);
                }
            }
        }
    }
};<commit_msg>Fix2<commit_after>var creep_supplier = {

    /** @param {Creep} creep **/
    run: function(creep) {
        if (creep.ticksToLive <= creep.memory.deathWarn && creep.memory.priority != 'supplierNearDeath') {
            creep.memory.priority = 'supplierNearDeath';
        }

        if (!creep.memory.atSpot && Game.flags[creep.room.name + "Supply"] && (creep.pos.x != Game.flags[creep.room.name + "Supply"].pos.x || creep.pos.y != Game.flags[creep.room.name + "Supply"].pos.y)) {
            creep.travelTo(Game.flags[creep.room.name + "Supply"]);
        } else if (_.sum(creep.carry) == 0) {
            creep.memory.atSpot = true;
            //Get from storage
            var storageTarget = creep.room.storage;
            if (storageTarget) {
                if (creep.withdraw(storageTarget, RESOURCE_ENERGY) == ERR_NOT_IN_RANGE) {
                    creep.travelTo(storageTarget);
                }
            }
        } else if (Memory.towerNeedEnergy[creep.room.name].length) {
            var target = Game.getObjectById(Memory.towerNeedEnergy[creep.room.name][0]);
            if (target) {
                if (creep.transfer(target, RESOURCE_ENERGY) == ERR_NOT_IN_RANGE) {
                    creep.travelTo(target);
                }
            } else {
                //Destroyed, remove from list
                Memory.towerNeedEnergy[creep.room.name].splice(0, 1);
            }
        }
    }
};
{'fraction_non_alphanumeric': 0.14154411764705882, 'fraction_numerical': 0.002573529411764706, 'mean_word_length': 1.9132762312633833, 'pattern_counts': {'":': 0, '<': 5, '<?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': '7557516', 'n_tokens_mistral': 895, 'n_tokens_neox': 850, 'n_words': 123}