// Clone returns non-shallow copy of the label
426699
func (c *CommandLabelV2) Clone() CommandLabel {
	command := make([]string, len(c.Command))
	copy(command, c.Command)
	return &CommandLabelV2{
		Command: command,
		Period:  c.Period,
		Result:  c.Result,
	}
}
322930
func (tp *TranslationProvider) Clone(d *deps.Deps) error {
	d.Translate = tp.t.Func(d.Language.Lang)

	return nil
}
168008
func (ds *DelayedSource) Clone() Source {
	return &DelayedSource{
		Source:  ds.Source.Clone(),
		Latency: ds.Latency,
	}
}
1234244
func (p *Program) Clone() *Program {
	if p == nil {
		return nil
	}
	cp := *p
	if len(cp.otherTags) != 0 {
		cp.otherTags = make([]tagPair, len(cp.otherTags))
	}
	copy(cp.otherTags, p.otherTags)
	cp.id = -1
	cp.owner = nil
	return &cp
}
664251
func (rb *Bitmap) Clone() *Bitmap {
	ptr := new(Bitmap)
	ptr.highlowcontainer = *rb.highlowcontainer.clone()
	return ptr
}
118100
func (c *Client) Clone() *Client {
	n := &Client{
		AccessToken:            c.AccessToken,
		AccessTokenSecret:      c.AccessTokenSecret,
		Zone:                   c.Zone,
		TraceMode:              c.TraceMode,
		DefaultTimeoutDuration: c.DefaultTimeoutDuration,
		UserAgent:              c.UserAgent,
		AcceptLanguage:         c.AcceptLanguage,
		RequestTracer:          c.RequestTracer,
		ResponseTracer:         c.ResponseTracer,
		RetryMax:               c.RetryMax,
		RetryInterval:          c.RetryInterval,
		HTTPClient:             c.HTTPClient,
	}
	n.API = newAPI(n)
	return n
}
279141
func (c *Container) Clone() (out *Container) {
	statsHit("Container/Clone")
	switch c.typ {
	case containerArray:
		statsHit("Container/Clone/Array")
		cArray := c.array()
		array := make([]uint16, len(cArray))
		copy(array, cArray)
		out = NewContainerArray(array)
	case containerBitmap:
		statsHit("Container/Clone/Bitmap")
		other := NewContainerBitmap(c.n, nil)
		copy(other.bitmap(), c.bitmap())
		out = other
	case containerRun:
		statsHit("Container/Clone/Run")
		cRuns := c.runs()
		runs := make([]interval16, len(cRuns))
		copy(runs, cRuns)
		out = NewContainerRun(runs)
	}
	// this should probably never happen
	if roaringParanoia {
		if out.n != out.count() {
			panic("cloned container has wrong n")
		}
	}
	return out
}
97781
func (ki KeyInfo) Clone() KeyInfo {
	result := make([]*Column, 0, len(ki))
	for _, col := range ki {
		result = append(result, col.Clone().(*Column))
	}
	return result
}
1277190
func (data Data) Clone() Data {
	r := make(Data)
	for k, v := range data {
		r[k] = v
	}
	return r
}
1101507
func (s *OrderedSet) Clone() *OrderedSet {
	clone := NewOrderedSetWithCapacity(s.Cardinality())
	for _, i := range s.s {
		clone.Add(i)
	}
	return clone
}
811602
func (s *Selection) Clone() *Selection {
	ns := newEmptySelection(s.document)
	ns.Nodes = cloneNodes(s.Nodes)
	return ns
}
1035892
func (n *node) clone() *node {
	return &node{
		value:    n.value,
		children: n.cloneChildren(),
	}
}
820354
func (this *summaryMetricsSource) cloneLabels(labels map[string]string) map[string]string {
	clone := make(map[string]string, len(labels))
	for k, v := range labels {
		clone[k] = v
	}
	return clone
}
1311240
func (s *Shape) Clone(newName string) *Shape {
	if s.AliasedShapeName {
		panic(fmt.Sprintf("attempted to clone and rename %s, but flagged as aliased",
			s.ShapeName))
	}

	n := new(Shape)
	*n = *s

	debugLogger.Logln("cloning", s.ShapeName, "to", newName)

	n.MemberRefs = map[string]*ShapeRef{}
	for k, r := range s.MemberRefs {
		nr := new(ShapeRef)
		*nr = *r
		nr.Shape.refs = append(nr.Shape.refs, nr)
		n.MemberRefs[k] = nr
	}

	if n.MemberRef.Shape != nil {
		n.MemberRef.Shape.refs = append(n.MemberRef.Shape.refs, &n.MemberRef)
	}
	if n.KeyRef.Shape != nil {
		n.KeyRef.Shape.refs = append(n.KeyRef.Shape.refs, &n.KeyRef)
	}
	if n.ValueRef.Shape != nil {
		n.ValueRef.Shape.refs = append(n.ValueRef.Shape.refs, &n.ValueRef)
	}

	n.refs = []*ShapeRef{}

	n.Required = append([]string{}, n.Required...)
	n.Enum = append([]string{}, n.Enum...)
	n.EnumConsts = append([]string{}, n.EnumConsts...)

	n.OrigShapeName = n.ShapeName
	n.API.Shapes[newName] = n
	n.ShapeName = newName

	return n
}
79468
func (b Box) Clone() Box {
	return Box{
		IsSet:  b.IsSet,
		Top:    b.Top,
		Left:   b.Left,
		Right:  b.Right,
		Bottom: b.Bottom,
	}
}
436336
func (sl *StoreLimits) Clone() *StoreLimits {
	cloned := *sl
	cloned.PerChannel = sl.ClonePerChannelMap()
	return &cloned
}
1020775
func (c *Curl) Clone() SpongeFunction {
	clone := NewCurl(c.Rounds).(*Curl)
	copy(clone.State, c.State)
	return clone
}