public Builder clear() {
        super.clear();
        if (theIDBuilder_ == null) {
          theID_ = org.bwapi.proxy.messages.GameMessages.UnitId.getDefaultInstance();
        } else {
          theIDBuilder_.clear();
        }
        bitField0_ = (bitField0_ & ~0x00000001);
        player_ = 0;
        bitField0_ = (bitField0_ & ~0x00000002);
        if (typeBuilder_ == null) {
          type_ = org.bwapi.proxy.messages.GameMessages.UnitType.getDefaultInstance();
        } else {
          typeBuilder_.clear();
        }
        bitField0_ = (bitField0_ & ~0x00000004);
        if (initialTypeBuilder_ == null) {
          initialType_ = org.bwapi.proxy.messages.GameMessages.UnitType.getDefaultInstance();
        } else {
          initialTypeBuilder_.clear();
        }
        bitField0_ = (bitField0_ & ~0x00000008);
        hitPoints_ = 0;
        bitField0_ = (bitField0_ & ~0x00000010);
        initialHitPoints_ = 0;
        bitField0_ = (bitField0_ & ~0x00000020);
        shields_ = 0;
        bitField0_ = (bitField0_ & ~0x00000040);
        energy_ = 0;
        bitField0_ = (bitField0_ & ~0x00000080);
        resources_ = 0;
        bitField0_ = (bitField0_ & ~0x00000100);
        resourceGroup_ = 0;
        bitField0_ = (bitField0_ & ~0x00000200);
        initialResources_ = 0;
        bitField0_ = (bitField0_ & ~0x00000400);
        killCount_ = 0;
        bitField0_ = (bitField0_ & ~0x00000800);
        groundWeaponCooldown_ = 0;
        bitField0_ = (bitField0_ & ~0x00001000);
        airWeaponCooldown_ = 0;
        bitField0_ = (bitField0_ & ~0x00002000);
        spellCooldown_ = 0;
        bitField0_ = (bitField0_ & ~0x00004000);
        defenseMatrixPoints_ = 0;
        bitField0_ = (bitField0_ & ~0x00008000);
        defenseMatrixTimer_ = 0;
        bitField0_ = (bitField0_ & ~0x00010000);
        ensnareTimer_ = 0;
        bitField0_ = (bitField0_ & ~0x00020000);
        irradiateTimer_ = 0;
        bitField0_ = (bitField0_ & ~0x00040000);
        lockdownTimer_ = 0;
        bitField0_ = (bitField0_ & ~0x00080000);
        maelstromTimer_ = 0;
        bitField0_ = (bitField0_ & ~0x00100000);
        plagueTimer_ = 0;
        bitField0_ = (bitField0_ & ~0x00200000);
        removeTimer_ = 0;
        bitField0_ = (bitField0_ & ~0x00400000);
        stasisTimer_ = 0;
        bitField0_ = (bitField0_ & ~0x00800000);
        stimTimer_ = 0;
        bitField0_ = (bitField0_ & ~0x01000000);
        if (positionBuilder_ == null) {
          position_ = org.bwapi.proxy.messages.BasicTypes.Position.getDefaultInstance();
        } else {
          positionBuilder_.clear();
        }
        bitField0_ = (bitField0_ & ~0x02000000);
        if (initialPositionBuilder_ == null) {
          initialPosition_ = org.bwapi.proxy.messages.BasicTypes.Position.getDefaultInstance();
        } else {
          initialPositionBuilder_.clear();
        }
        bitField0_ = (bitField0_ & ~0x04000000);
        if (tilePositionBuilder_ == null) {
          tilePosition_ = org.bwapi.proxy.messages.BasicTypes.TilePosition.getDefaultInstance();
        } else {
          tilePositionBuilder_.clear();
        }
        bitField0_ = (bitField0_ & ~0x08000000);
        if (initialTilePositionBuilder_ == null) {
          initialTilePosition_ = org.bwapi.proxy.messages.BasicTypes.TilePosition.getDefaultInstance();
        } else {
          initialTilePositionBuilder_.clear();
        }
        bitField0_ = (bitField0_ & ~0x10000000);
        angle_ = 0D;
        bitField0_ = (bitField0_ & ~0x20000000);
        velocityX_ = 0D;
        bitField0_ = (bitField0_ & ~0x40000000);
        velocityY_ = 0D;
        bitField0_ = (bitField0_ & ~0x80000000);
        if (targetBuilder_ == null) {
          target_ = org.bwapi.proxy.messages.GameMessages.UnitId.getDefaultInstance();
        } else {
          targetBuilder_.clear();
        }
        bitField1_ = (bitField1_ & ~0x00000001);
        if (targetPositionBuilder_ == null) {
          targetPosition_ = org.bwapi.proxy.messages.BasicTypes.Position.getDefaultInstance();
        } else {
          targetPositionBuilder_.clear();
        }
        bitField1_ = (bitField1_ & ~0x00000002);
        order_ = 0;
        bitField1_ = (bitField1_ & ~0x00000004);
        if (orderTargetBuilder_ == null) {
          orderTarget_ = org.bwapi.proxy.messages.GameMessages.UnitId.getDefaultInstance();
        } else {
          orderTargetBuilder_.clear();
        }
        bitField1_ = (bitField1_ & ~0x00000008);
        orderTimer_ = 0;
        bitField1_ = (bitField1_ & ~0x00000010);
        secondaryOrder_ = 0;
        bitField1_ = (bitField1_ & ~0x00000020);
        if (buildUnitBuilder_ == null) {
          buildUnit_ = org.bwapi.proxy.messages.GameMessages.UnitId.getDefaultInstance();
        } else {
          buildUnitBuilder_.clear();
        }
        bitField1_ = (bitField1_ & ~0x00000040);
        remainingBuildTime_ = 0;
        bitField1_ = (bitField1_ & ~0x00000080);
        remainingTrainTime_ = 0;
        bitField1_ = (bitField1_ & ~0x00000100);
        if (trainingQueueBuilder_ == null) {
          trainingQueue_ = java.util.Collections.emptyList();
          bitField1_ = (bitField1_ & ~0x00000200);
        } else {
          trainingQueueBuilder_.clear();
        }
        if (transportBuilder_ == null) {
          transport_ = org.bwapi.proxy.messages.GameMessages.UnitId.getDefaultInstance();
        } else {
          transportBuilder_.clear();
        }
        bitField1_ = (bitField1_ & ~0x00000400);
        if (loadedUnitsBuilder_ == null) {
          loadedUnits_ = java.util.Collections.emptyList();
          bitField1_ = (bitField1_ & ~0x00000800);
        } else {
          loadedUnitsBuilder_.clear();
        }
        interceptorCount_ = 0;
        bitField1_ = (bitField1_ & ~0x00001000);
        scarabCount_ = 0;
        bitField1_ = (bitField1_ & ~0x00002000);
        spiderMineCount_ = 0;
        bitField1_ = (bitField1_ & ~0x00004000);
        tech_ = 0;
        bitField1_ = (bitField1_ & ~0x00008000);
        upgrade_ = 0;
        bitField1_ = (bitField1_ & ~0x00010000);
        remainingResearchTime_ = 0;
        bitField1_ = (bitField1_ & ~0x00020000);
        remainingUpgradeTime_ = 0;
        bitField1_ = (bitField1_ & ~0x00040000);
        if (rallyPositionBuilder_ == null) {
          rallyPosition_ = org.bwapi.proxy.messages.BasicTypes.Position.getDefaultInstance();
        } else {
          rallyPositionBuilder_.clear();
        }
        bitField1_ = (bitField1_ & ~0x00080000);
        if (rallyUnitBuilder_ == null) {
          rallyUnit_ = org.bwapi.proxy.messages.GameMessages.UnitId.getDefaultInstance();
        } else {
          rallyUnitBuilder_.clear();
        }
        bitField1_ = (bitField1_ & ~0x00100000);
        if (addonBuilder_ == null) {
          addon_ = org.bwapi.proxy.messages.GameMessages.UnitId.getDefaultInstance();
        } else {
          addonBuilder_.clear();
        }
        bitField1_ = (bitField1_ & ~0x00200000);
        if (carrierBuilder_ == null) {
          carrier_ = org.bwapi.proxy.messages.GameMessages.UnitId.getDefaultInstance();
        } else {
          carrierBuilder_.clear();
        }
        bitField1_ = (bitField1_ & ~0x00400000);
        if (interceptorsBuilder_ == null) {
          interceptors_ = java.util.Collections.emptyList();
          bitField1_ = (bitField1_ & ~0x00800000);
        } else {
          interceptorsBuilder_.clear();
        }
        if (nydusExitBuilder_ == null) {
          nydusExit_ = org.bwapi.proxy.messages.GameMessages.UnitId.getDefaultInstance();
        } else {
          nydusExitBuilder_.clear();
        }
        bitField1_ = (bitField1_ & ~0x01000000);
        exists_ = false;
        bitField1_ = (bitField1_ & ~0x02000000);
        hasNuke_ = false;
        bitField1_ = (bitField1_ & ~0x04000000);
        accelerating_ = false;
        bitField1_ = (bitField1_ & ~0x08000000);
        beingConstructed_ = false;
        bitField1_ = (bitField1_ & ~0x10000000);
        beingHealed_ = false;
        bitField1_ = (bitField1_ & ~0x20000000);
        blind_ = false;
        bitField1_ = (bitField1_ & ~0x40000000);
        braking_ = false;
        bitField1_ = (bitField1_ & ~0x80000000);
        burrowed_ = false;
        bitField2_ = (bitField2_ & ~0x00000001);
        carryingGas_ = false;
        bitField2_ = (bitField2_ & ~0x00000002);
        carryingMinerals_ = false;
        bitField2_ = (bitField2_ & ~0x00000004);
        cloaked_ = false;
        bitField2_ = (bitField2_ & ~0x00000008);
        completed_ = false;
        bitField2_ = (bitField2_ & ~0x00000010);
        constructing_ = false;
        bitField2_ = (bitField2_ & ~0x00000020);
        defenseMatrixed_ = false;
        bitField2_ = (bitField2_ & ~0x00000040);
        ensnared_ = false;
        bitField2_ = (bitField2_ & ~0x00000080);
        following_ = false;
        bitField2_ = (bitField2_ & ~0x00000100);
        gatheringGas_ = false;
        bitField2_ = (bitField2_ & ~0x00000200);
        gatheringMinerals_ = false;
        bitField2_ = (bitField2_ & ~0x00000400);
        hallucination_ = false;
        bitField2_ = (bitField2_ & ~0x00000800);
        idle_ = false;
        bitField2_ = (bitField2_ & ~0x00001000);
        irradiated_ = false;
        bitField2_ = (bitField2_ & ~0x00002000);
        lifted_ = false;
        bitField2_ = (bitField2_ & ~0x00004000);
        loaded_ = false;
        bitField2_ = (bitField2_ & ~0x00008000);
        lockedDown_ = false;
        bitField2_ = (bitField2_ & ~0x00010000);
        maelstrommed_ = false;
        bitField2_ = (bitField2_ & ~0x00020000);
        morphing_ = false;
        bitField2_ = (bitField2_ & ~0x00040000);
        moving_ = false;
        bitField2_ = (bitField2_ & ~0x00080000);
        parasited_ = false;
        bitField2_ = (bitField2_ & ~0x00100000);
        patrolling_ = false;
        bitField2_ = (bitField2_ & ~0x00200000);
        plagued_ = false;
        bitField2_ = (bitField2_ & ~0x00400000);
        repairing_ = false;
        bitField2_ = (bitField2_ & ~0x00800000);
        researching_ = false;
        bitField2_ = (bitField2_ & ~0x01000000);
        selected_ = false;
        bitField2_ = (bitField2_ & ~0x02000000);
        sieged_ = false;
        bitField2_ = (bitField2_ & ~0x04000000);
        startingAttack_ = false;
        bitField2_ = (bitField2_ & ~0x08000000);
        stasised_ = false;
        bitField2_ = (bitField2_ & ~0x10000000);
        stimmed_ = false;
        bitField2_ = (bitField2_ & ~0x20000000);
        training_ = false;
        bitField2_ = (bitField2_ & ~0x40000000);
        underStorm_ = false;
        bitField2_ = (bitField2_ & ~0x80000000);
        underAttack_ = false;
        bitField3_ = (bitField3_ & ~0x00000001);
        underDarkSwarm_ = false;
        bitField3_ = (bitField3_ & ~0x00000002);
        unpowered_ = false;
        bitField3_ = (bitField3_ & ~0x00000004);
        upgrading_ = false;
        bitField3_ = (bitField3_ & ~0x00000008);
        visible_ = false;
        bitField3_ = (bitField3_ & ~0x00000010);
        beingGathered_ = false;
        bitField3_ = (bitField3_ & ~0x00000020);
        if (larvaeBuilder_ == null) {
          larvae_ = java.util.Collections.emptyList();
          bitField3_ = (bitField3_ & ~0x00000040);
        } else {
          larvaeBuilder_.clear();
        }
        if (hatcheryBuilder_ == null) {
          hatchery_ = org.bwapi.proxy.messages.GameMessages.UnitId.getDefaultInstance();
        } else {
          hatcheryBuilder_.clear();
        }
        bitField3_ = (bitField3_ & ~0x00000080);
        if (buildTypeBuilder_ == null) {
          buildType_ = org.bwapi.proxy.messages.GameMessages.UnitType.getDefaultInstance();
        } else {
          buildTypeBuilder_.clear();
        }
        bitField3_ = (bitField3_ & ~0x00000100);
        detected_ = false;
        bitField3_ = (bitField3_ & ~0x00000200);
        attacking_ = false;
        bitField3_ = (bitField3_ & ~0x00000400);
        attackFrame_ = false;
        bitField3_ = (bitField3_ & ~0x00000800);
        stuck_ = false;
        bitField3_ = (bitField3_ & ~0x00001000);
        return this;
      }