// Clone returns a clone of the current path.
771524
func (p *Path) Clone() *Path {
	stack := p.stack
	return &Path{
		stack:       stack[:len(stack):len(stack)],
		qs:          p.qs,
		baseContext: p.baseContext,
	}
}
303152
func (p *BlockPuller) Clone() *BlockPuller {
	// Clone by value
	copy := *p
	// Reset internal state
	copy.stream = nil
	copy.blockBuff = nil
	copy.latestSeq = 0
	copy.endpoint = ""
	copy.conn = nil
	copy.cancelStream = nil
	return &copy
}
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
}
322930
func (tp *TranslationProvider) Clone(d *deps.Deps) error {
	d.Translate = tp.t.Func(d.Language.Lang)

	return nil
}
872465
func (s *Set) Clone() *Set {
	items := make([]string, len(s.items))
	copy(items, s.items)
	return &Set{items}
}
1145551
func (cl *CommandLine) Clone() *CommandLine {
	return &CommandLine{
		Target: cl.Target,
		Flags:  append([]CommandLineFlag(nil), cl.Flags...),
		Args:   append([]string(nil), cl.Args...),
	}
}
447033
func Clone(remoteURL string) (string, error) {
	repo, err := parseRemoteURL(remoteURL)

	if err != nil {
		return "", err
	}

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

	return outSet
}
467857
func (in crdStorageMap) clone() crdStorageMap {
	if in == nil {
		return nil
	}
	out := make(crdStorageMap, len(in))
	for key, value := range in {
		out[key] = value
	}
	return out
}
1128436
func (n *Node) clone() *Node {
	m := &Node{
		Type:     n.Type,
		DataAtom: n.DataAtom,
		Data:     n.Data,
		Attr:     make([]Attribute, len(n.Attr)),
	}
	copy(m.Attr, n.Attr)
	return m
}
1310582
func (s *DbSession) Clone() *DbSession {
	return &DbSession{db: s.db, Session: s.Session.Clone()}
}
1016990
func (fs *FilteringSink) Clone() Sink {
	return &FilteringSink{
		Sink:   fs.Sink.Clone(),
		Filter: fs.Filter,
	}
}
1306031
func (g *BuildGenerator) Clone(ctx context.Context, request *buildv1.BuildRequest) (*buildv1.Build, error) {
	var build *buildv1.Build
	var err error

	for i := 0; i < conflictRetries; i++ {
		build, err = g.clone(ctx, request)
		if err == nil || !errors.IsConflict(err) {
			break
		}
		klog.V(4).Infof("clone returned conflict, try %d/%d", i+1, conflictRetries)
	}

	return build, err
}
406550
func (c *Context) Clone() *Context {
	ctx := new(Context)
	*ctx = *c

	req := new(http.Request)
	*req = *c.Request
	ctx.Request = req
	c.CopyTo(ctx)

	res := new(http.Response)
	*res = *c.Response
	ctx.Response = res

	return ctx
}
58206
func (m Metric) Clone() Metric {
	clone := make(Metric, len(m))
	for k, v := range m {
		clone[k] = v
	}
	return clone
}
876884
func (path *Path) Clone(isWithdraw bool) *Path {
	return &Path{
		parent:           path,
		IsWithdraw:       isWithdraw,
		IsNexthopInvalid: path.IsNexthopInvalid,
		attrsHash:        path.attrsHash,
	}
}
11387
func (ds *DiskSource) Clone() Source {
	dsc := &DiskSource{
		BasePath:       ds.BasePath,
		BlockAddresses: ds.BlockAddresses,

		Container: ds.Container,
	}

	if ds.Decompressor != nil {
		dsc.Decompressor = ds.Decompressor.Clone()
	}

	return dsc
}