// Clone makes a copy of ByItems.
325850
func (by *ByItems) Clone() *ByItems {
	return &ByItems{Expr: by.Expr.Clone(), Desc: by.Desc}
}
1272881
func (c *ClassList) Clone() *ClassList {
	cl := ClassList{
		list: append([]string{}, c.list...),
	}

	return &cl
}
990582
func (s *Set) Clone() *Set {
	// Copy set into a new set
	outSet := New()
	for _, v := range s.Enumerate() {
		outSet.Add(v)
	}

	return outSet
}
1098645
func (c *HealthCheck) Clone() *HealthCheck {
	clone := new(HealthCheck)
	*clone = *c
	return clone
}
912474
func (k *Kerl) Clone() SpongeFunction {
	clone := NewKerl().(*Kerl)

	clone.s = keccak.CloneState(k.s)
	return clone
}
1035892
func (n *node) clone() *node {
	return &node{
		value:    n.value,
		children: n.cloneChildren(),
	}
}
459834
func (d *DirEntry) Clone() *DirEntry {
	return &DirEntry{
		LockIndex: d.LockIndex,
		Key:       d.Key,
		Flags:     d.Flags,
		Value:     d.Value,
		Session:   d.Session,
		RaftIndex: RaftIndex{
			CreateIndex: d.CreateIndex,
			ModifyIndex: d.ModifyIndex,
		},
	}
}
528708
func (list *List) Clone() List {
	n := New()
	if list.length == 0 {
		return n
	}
	tmp := list.first
	for i := 0; i < list.length; i++ {
		s := tmp.Content
		n.Push(s)
		tmp = tmp.Next
	}
	return n
}
1345407
func (sn *Snapshot) Clone(target string) (*Dataset, error) {
	err := exec.Command("zfs", "clone", sn.Name, target).Run()
	if err != nil {
		return nil, err
	}
	return GetDataset(target)
}
1084728
func (es *EventStream) Clone() *EventStream {
	patient := new(models.Patient)
	if es.Patient != nil {
		*patient = *es.Patient
	}
	events := make([]Event, len(es.Events))
	copy(events, es.Events)
	return &EventStream{
		Patient: patient,
		Events:  events,
	}
}
1032906
func (k internalKey) clone() internalKey {
	x := make(internalKey, len(k))
	copy(x, k)
	return x
}
1094717
func (context *Context) Clone() *Context {
	return &Context{
		Widgets:          context.Widgets,
		DB:               context.DB,
		AvailableWidgets: context.AvailableWidgets,
		Options:          context.Options,
		InlineEdit:       context.InlineEdit,
		FuncMaps:         context.FuncMaps,
		WidgetSetting:    context.WidgetSetting,
	}
}
668694
func (p *Peer) clone() *Peer {
	p.Lock()
	defer p.Unlock()
	return &Peer{
		Name:             p.Name,
		ConnectionString: p.ConnectionString,
		prevLogIndex:     p.prevLogIndex,
		lastActivity:     p.lastActivity,
	}
}
553492
func (s *Layer) Clone() Middleware {
	mw := New()
	mw.parent = s.parent
	s.mtx.Lock()
	mw.stack = append([]plugin.Plugin(nil), s.stack...)
	s.mtx.Unlock()
	return mw
}
1055650
func (t *TableInfo) Clone() *TableInfo {
	nt := *t
	nt.Columns = make([]*ColumnInfo, len(t.Columns))
	nt.Indices = make([]*IndexInfo, len(t.Indices))

	for i := range t.Columns {
		nt.Columns[i] = t.Columns[i].Clone()
	}

	for i := range t.Indices {
		nt.Indices[i] = t.Indices[i].Clone()
	}

	return &nt
}
253940
func (bv Values) Clone() Values {
	if n := len(bv); n > 0 {
		values := make(Values, n, n)
		copy(values, bv)
		return values
	}

	return NewValues()
}
910402
func (set TargetIDSet) Clone() TargetIDSet {
	setCopy := NewTargetIDSet()
	for k, v := range set {
		setCopy[k] = v
	}
	return setCopy
}