Collapse the builder into a single object
325956
function toSQL(method) {
    method = method || this.method;
    var val = this[method]();
    var defaults = {
      method: method,
      options: assign({}, this.options),
      bindings: this.formatter.bindings
    };
    if (typeof val === 'string') {
      val = { sql: val };
    }

    if (method === 'select' && this.single.as) {
      defaults.as = this.single.as;
    }
    var out = assign(defaults, val);
    debug(out);
    return out;
  }
1238471
function Builder( name, isNode, outputPath ) {
	this.gypObject = emptySkeliton;
	this.isNode = isNode || false;		// Default to non-node configs
	this.name = name || "binding";		// Default our name to binding for node.js
	this.outputPath = outputPath || process.cwd() + "/" + this.name + "/";
}
44649
def build(self, builder):
        
        builder.start("ReasonForChange", {})
        builder.data(self.reason)
        builder.end("ReasonForChange")
824822
@Nonnull
	public static <T, R> LObjBoolFunctionBuilder<T, R> objBoolFunction(Consumer<LObjBoolFunction<T, R>> consumer) {
		return new LObjBoolFunctionBuilder(consumer);
	}
108415
def build(self, builder):
        """"""
        builder.start("CheckValue", {})
        builder.data(str(self.value))
        builder.end("CheckValue")
844871
function (target, objects, options) {

            for (var object in objects) {
                if (objects.hasOwnProperty(object)) {
                    recursiveMerge(target, objects[object]);
                }
            }

            function recursiveMerge(target, object) {
                for (var property in object) {
                    if (object.hasOwnProperty(property)) {
                        var current = object[property];
                        if (utils.getConstructor(current) === 'Object') {
                            if (!target[property]) {
                                target[property] = {};
                            }
                            recursiveMerge(target[property], current);
                        }
                        else {
                            // clearEmpty
                            if (options.clearEmpty) {
                                if (current == null) {
                                    continue;
                                }
                            }
                            target[property] = current;
                        }
                    }
                }
            }

            return target;
        }
1242298
private void generateWrappingPart(WrappingHint.Builder builder) {
        builder.setWrappingMethodOwnerName(configuration.UNMODIFIABLE_METHOD_OWNER)
                .setWrappingMethodName(configuration.FIELD_TYPE_TO_UNMODIFIABLE_METHOD.get(typeAssignedToField));
    }
1257832
function (node, single, layoutBy) {
    if (!node._private.data.collapsedChildren){
      return;
    }

    //check how the position of the node is changed
    var positionDiff = {
      x: node._private.position.x - node._private.data['position-before-collapse'].x,
      y: node._private.position.y - node._private.data['position-before-collapse'].y
    };

    node.removeData("infoLabel");
    node.removeClass('cy-expand-collapse-collapsed-node');

    node.trigger("expandcollapse.beforeexpand");
    node._private.data.collapsedChildren.restore();
    this.repairEdges(node);
    node._private.data.collapsedChildren = null;

    elementUtilities.moveNodes(positionDiff, node.children());
    node.removeData('position-before-collapse');

    node.trigger("position"); // position not triggered by default when nodes are moved
    node.trigger("expandcollapse.afterexpand");

    // If expand is called just for one node then call end operation to perform layout
    if (single) {
      this.endOperation(layoutBy);
    }
  }
489220
@Nonnull
	public static <T> LObjByteConsumer<T> objByteConsumerFrom(Consumer<LObjByteConsumerBuilder<T>> buildingFunction) {
		LObjByteConsumerBuilder builder = new LObjByteConsumerBuilder();
		buildingFunction.accept(builder);
		return builder.build();
	}
998164
def build_object(self, obj):
        """"""
        try:
            build_path = self.get_build_path(obj)
            self.request = self.create_request(build_path)
            self.request.user = AnonymousUser()
            self.set_kwargs(obj)
            self.build_file(build_path, self.get_content())
        except Http404:
            # cleanup directory
            self.unbuild_object(obj)
115028
def build(self, builder):
        
        builder.start("DateTimeStamp", {})
        if isinstance(self.date_time, datetime):
            builder.data(dt_to_iso8601(self.date_time))
        else:
            builder.data(self.date_time)
        builder.end("DateTimeStamp")
427381
def build(self, builder):
        """"""
        params = dict(LabelOID=self.oid, OrderNumber=str(self.order_number))

        builder.start("mdsol:LabelRef", params)
        builder.end("mdsol:LabelRef")
768261
function() { 
        for (var i=0;i<this.children.length;++i) {
            this.children[i].collapse();
            this.children[i].collapseAll();
        }
    }
81384
@SuppressWarnings("unchecked")
    protected void buildObject() {

        final Class<?> objectType = ClassUtility.findGenericClass(this.getClass(), OBJECT_EXCLUDED_CLASSES);

        // If not generic type is defined for Object, object field will remain null
        if (objectType != null) {
            Object keyPart = null;
            boolean found = false;
            for (int i = 0; !found && i < getListKeyPart().size(); i++) {
                keyPart = getListKeyPart().get(i);

                if (objectType.isAssignableFrom(keyPart.getClass())) {

                    this.object = (O) keyPart;
                    found = true;
                }
            }

            if (this.object == null) {
                // Build the current default object by reflection if it hadn't been provided into the key without any constructor parameters
                try {
                    this.object = (O) ClassUtility.buildGenericType(this.getClass(), OBJECT_EXCLUDED_CLASSES);
                } catch (final CoreException ce) {
                    LOGGER.log(UIMessages.CREATION_FAILURE, ce, this.getClass().getName());
                    throw new CoreRuntimeException(ce);
                }
            }
        }
    }
183432
function collapse(d) {
    if (d.children) {
      d._children = d.children;
      d._children.forEach(collapse);
      d.children = null;
    }
  }
306661
def unbuild_object(self, obj):
        
        logger.debug("Unbuilding %s" % obj)
        target_path = os.path.split(self.get_build_path(obj))[0]
        if self.fs.exists(target_path):
            logger.debug("Removing {}".format(target_path))
            self.fs.removetree(target_path)
104633
public static Builder builder(
      JCTree tree, String name, @Nullable String link, SeverityLevel severity, String message) {
    return new Builder(tree, name, link, severity, message);
  }