<S extends Shape, B extends AbstractShapeBuilder<B, S>> B updateBuilder(B builder) {
        builder.id(getId());
        builder.source(getSourceLocation());
        // Only add introduced traits to the builder to allow model load -> rebuild -> serialize roundtripping.
        builder.addTraits(getIntroducedTraits().values());
        builder.mixins(mixins.values());

        // Add members to the builder that are not just strictly inherited from mixins.
        for (MemberShape member : members()) {
            if (member.getMixins().isEmpty() || !member.getIntroducedTraits().isEmpty()) {
                builder.addMember(member);
            }
        }

        return builder;
    }
Copies the ID, source location, all traits, and mixins of the shape to the builder.

@param builder Builder to update.
@param <S> Type of shape being built.
@param <B> Type of builder being built.
@return Returns the builder.
smithy-model/src/main/java/software/amazon/smithy/model/shapes/Shape.java