// Clone creates an exact copy of a Collector without callbacks.
// HTTP backend, robots.txt cache and cookie jar are shared
// between collectors.
7531
func (c *Collector) Clone() *Collector {
	return &Collector{
		AllowedDomains:         c.AllowedDomains,
		AllowURLRevisit:        c.AllowURLRevisit,
		CacheDir:               c.CacheDir,
		DetectCharset:          c.DetectCharset,
		DisallowedDomains:      c.DisallowedDomains,
		ID:                     atomic.AddUint32(&collectorCounter, 1),
		IgnoreRobotsTxt:        c.IgnoreRobotsTxt,
		MaxBodySize:            c.MaxBodySize,
		MaxDepth:               c.MaxDepth,
		DisallowedURLFilters:   c.DisallowedURLFilters,
		URLFilters:             c.URLFilters,
		CheckHead:              c.CheckHead,
		ParseHTTPErrorResponse: c.ParseHTTPErrorResponse,
		UserAgent:              c.UserAgent,
		store:                  c.store,
		backend:                c.backend,
		debugger:               c.debugger,
		Async:                  c.Async,
		RedirectHandler:        c.RedirectHandler,
		errorCallbacks:         make([]ErrorCallback, 0, 8),
		htmlCallbacks:          make([]*htmlCallbackContainer, 0, 8),
		xmlCallbacks:           make([]*xmlCallbackContainer, 0, 8),
		scrapedCallbacks:       make([]ScrapedCallback, 0, 8),
		lock:                   c.lock,
		requestCallbacks:       make([]RequestCallback, 0, 8),
		responseCallbacks:      make([]ResponseCallback, 0, 8),
		robotsMap:              c.robotsMap,
		wg:                     &sync.WaitGroup{},
	}
}
877120
func (d *D) Clone() *D {
	return &D{
		Values:   d.Values.Clone(),
		hijacker: d.hijacker,
		goodFunc: d.goodFunc,
	}
}
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
}
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
}
179546
func (c Collection) Clone() Collection {
	if c == nil {
		return nil
	}

	nc := make(Collection, len(c))
	for i, g := range c {
		nc[i] = Clone(g)
	}

	return nc
}
1185536
func (t *Record) Clone() interface{} {
	retVal := new(Record)
	ts := BorrowTypes(len(t.ts))
	for i, tt := range t.ts {
		if c, ok := tt.(Cloner); ok {
			ts[i] = c.Clone().(Type)
		} else {
			ts[i] = tt
		}
	}
	retVal.ts = ts
	retVal.name = t.name

	return retVal
}
1015619
func (f *FormatEncoder) Clone() zapcore.Encoder {
	return &FormatEncoder{
		Encoder:    f.Encoder.Clone(),
		formatters: f.formatters,
		pool:       f.pool,
	}
}
253940
func (bv Values) Clone() Values {
	if n := len(bv); n > 0 {
		values := make(Values, n, n)
		copy(values, bv)
		return values
	}

	return NewValues()
}
425068
func (w *ResponseRecorder) Clone() ResponseWriter {
	wc := &ResponseRecorder{}
	wc.headers = w.headers
	wc.chunks = w.chunks[0:]
	if resW, ok := w.ResponseWriter.(*responseWriter); ok {
		wc.ResponseWriter = &(*resW) // clone it
	} else { // else just copy, may pointer, developer can change its behavior
		wc.ResponseWriter = w.ResponseWriter
	}

	return wc
}
1274247
func (p *PooledCloner) Clone(a, b interface{}) error {
	c := p.pool.Get().(refmt.Cloner)
	err := c.Clone(a, b)
	p.pool.Put(c)
	return err
}
137422
func (p *Tagger) Clone() *Tagger {
	return &Tagger{
		Model:  p.Model,
		corpus: p.corpus,

		Output: make(chan lingo.AnnotatedSentence),

		sentences: make(chan lingo.AnnotatedSentence),

		Lemmatizer: p.Lemmatizer,
		Stemmer:    p.Stemmer,
		clusters:   p.clusters,
	}
}
1301674
func (rules Rules) Clone() Rules {
	rulesCopy := make(Rules)

	for pattern, targetIDSet := range rules {
		rulesCopy[pattern] = targetIDSet.Clone()
	}

	return rulesCopy
}
1158455
func (*TemplateProvider) Clone(d *deps.Deps) error {

	t := d.Tmpl.(*templateHandler)
	clone := t.clone(d)

	d.Tmpl = clone

	return clone.MarkReady()

}
245418
func (t *Status) Clone() *Status {
	return &Status{
		TunnelID:                  t.TunnelID,
		MinikubeState:             t.MinikubeState,
		MinikubeError:             t.MinikubeError,
		RouteError:                t.RouteError,
		PatchedServices:           t.PatchedServices,
		LoadBalancerEmulatorError: t.LoadBalancerEmulatorError,
	}
}
1189852
func (c *config) clone() *config {
	new := &config{
		threshold:   c.threshold,
		frames:      c.frames,
		errorFrames: c.errorFrames,
		registry:    make(registry),
	}
	for collector, entry := range c.registry {
		new.registry[collector] = entry.clone()
	}
	return new
}
631044
func (m *MockBackoff) Clone() backoff.Backoff {
	r0 := m.CloneFunc.nextHook()()
	m.CloneFunc.history = append(m.CloneFunc.history, BackoffCloneFuncCall{r0})
	return r0
}