// find potential nils
420818
func reportPotentialNils(pkg *PkgState) {
	nils := pkg.checkNils()
	if len(nils) > 0 {
		fmt.Printf("## Potential Nils ##\nThese functions have a `*T` return value, but a possible null exception error might happen\n\n")
		for _, n := range nils {
			fmt.Printf("* `%v`\n", n)
		}
	}
	fmt.Println()
}
804658
func (s *UserService) FindUsers(ctx context.Context, filter platform.UserFilter, opts ...platform.FindOptions) ([]*platform.User, int, error) {
	return s.FindUsersFn(ctx, filter, opts...)
}
1104642
func (offers Slice) Find(filter Filter) *mesos.Offer {
	for i := range offers {
		offer := &offers[i]
		if filter.Accept(offer) {
			return offer
		}
	}
	return nil
}
73544
func Find(nodes []ast.Node, filter Filter) []ast.Node {
	var found []ast.Node
	for _, node := range nodes {
		found = append(found, find(node, filter)...)
	}
	return found
}
55952
func (r Root) FindAll(args ...string) []Root {
	temp := findAllofem(r.Pointer, args, false)
	if len(temp) == 0 {
		if debug {
			panic("Element `" + args[0] + "` with attributes `" + strings.Join(args[1:], " ") + "` not found")
		}
		return []Root{}
	}
	pointers := make([]Root, 0, len(temp))
	for i := 0; i < len(temp); i++ {
		pointers = append(pointers, Root{temp[i], temp[i].Data, nil})
	}
	return pointers
}
827206
func best(input string, potential map[string]*Potential) string {
	var best string
	var bestcalc, bonus int
	for i := 0; i < 4; i++ {
		for _, pot := range potential {
			if pot.Leven == 0 {
				return pot.Term
			} else if pot.Leven == i {
				bonus = 0
				// If the first letter is the same, that's a good sign. Bias these potentials
				if pot.Term[0] == input[0] {
					bonus += 100
				}
				if pot.Score+bonus > bestcalc {
					bestcalc = pot.Score + bonus
					best = pot.Term
				}
			}
		}
		if bestcalc > 0 {
			return best
		}
	}
	return best
}
1252366
func find(db *gorm.DB, scope scope, v interface{}) error {
	return scope.scope(db).Find(v).Error
}
309816
func (this Collection) FindAll(s interface{}) Collection {
    re := getRegexp(s)
    var result Collection
    for _, c := range this {
        result = append(result, c.FindAll(re)...)
    }

    return result
}
266597
func (query Query) FindBy(col string, val interface{}) Query {
	return query.Where(c.Eq(c.I(query.Collection+"."+col), val))
}
776832
func (f *Finder) Find(
	ctx context.Context, ipath ...string) ([]FindResult, error) {

	if len(ipath) == 0 {
		ipath = []string{""}
	}
	var result []FindResult
	for _, p := range ipath {
		results, err := f.find(ctx, p)
		if err != nil {
			return nil, err
		}
		result = append(result, results...)
	}
	return result, nil
}
259774
func (g roleGraphEdgesTable) Find(user, host string) bool {
	if host == "" {
		host = "%"
	}
	key := user + "@" + host
	if g.roleList == nil {
		return false
	}
	_, ok := g.roleList[key]
	return ok
}
1267559
func (model *Model) Potentials(input string, exhaustive bool) map[string]*Potential {
	model.RLock()
	defer model.RUnlock()
	return model.suggestPotential(input, exhaustive)
}
610472
func (q *Qbs) FindAll(ptrOfSliceOfStructPtr interface{}) error {
	strucType := reflect.TypeOf(ptrOfSliceOfStructPtr).Elem().Elem().Elem()
	strucPtr := reflect.New(strucType).Interface()
	q.criteria.model = structPtrToModel(strucPtr, !q.criteria.omitJoin, q.criteria.omitFields)
	query, args := q.Dialect.querySql(q.criteria)
	return q.doQueryRows(ptrOfSliceOfStructPtr, query, args...)
}
916793
func (env *Zlisp) FindLoop(target *Loop) (int, error) {
	if env.curfunc.user {
		panic(fmt.Errorf("impossible in user-defined-function to find a loop '%s'", target.stmtname.name))
	}
	instruc := env.curfunc.fun
	for i := range instruc {
		switch loop := instruc[i].(type) {
		case LoopStartInstr:
			if loop.loop == target {
				return i, nil
			}
		}
	}
	return -1, fmt.Errorf("could not find loop target '%s'", target.stmtname.name)
}
147882
func (g *Virtual) find(v int, a int) (w int, n int) {
	prev := -1
	g.visit(v, a, func(w0 int, c0 int64) (skip bool) {
		switch prev {
		case -1:
			w, n = w0, 1
			prev = w0
			return
		case w0 - 1:
			n += 1
			prev = w0
			return
		}
		return true
	})
	return
}
1246999
func findValue(v reflect.Value) (reflect.Value, bool) {
	for ; v.Kind() == reflect.Ptr || v.Kind() == reflect.Interface; v = v.Elem() {
		if v.IsNil() {
			return v, true
		}
		if v.Kind() == reflect.Interface && v.NumMethod() > 0 {
			break
		}
	}
	return v, false
}
365596
func (cp *callPool) Find(id uint64) (c *Call) {
	cp.RLock()
	c = cp.pending[id]
	cp.RUnlock()
	return
}