// GetRecall returns the fraction of the total occurrences of a
// given class which were predicted.
17515
func GetRecall(class string, c ConfusionMatrix) float64 {
	// Fraction of relevant instances that are retrieved
	truePositives := GetTruePositives(class, c)
	falseNegatives := GetFalseNegatives(class, c)
	return truePositives / (truePositives + falseNegatives)
}
1297463
func (mr *MockRevocationHandlerMockRecorder) RevokeToken(arg0, arg1, arg2, arg3 interface{}) *gomock.Call {
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RevokeToken", reflect.TypeOf((*MockRevocationHandler)(nil).RevokeToken), arg0, arg1, arg2, arg3)
}
1245784
func (m *Mock) Called(arguments ...interface{}) *MockResult {
	var timeout time.Duration
	defer func() {
		m.mutex.Unlock()
		if timeout > 0 {
			time.Sleep(timeout)
		}
	}()
	m.mutex.Lock()

	pc, _, _, ok := runtime.Caller(1)
	if !ok {
		panic("Could not get the caller information")
	}

	functionPath := runtime.FuncForPC(pc).Name()
	parts := strings.Split(functionPath, ".")
	functionName := parts[len(parts)-1]

	if f := m.find(functionName, arguments...); f != nil {
		// Increase the counter
		f.count++
		f.order = m.order
		m.order++

		if f.call.IsValid() {
			typ := f.call.Type()
			numIn := typ.NumIn()
			numArgs := len(arguments)

			// Assign arguments in order.
			// Not all of them are strictly required.
			values := make([]reflect.Value, numIn)
			for i := 0; i < numIn; i++ {
				if i < numArgs {
					values[i] = reflect.ValueOf(arguments[i])
				} else {
					values[i] = reflect.Zero(typ.In(i))
				}
			}

			if typ.IsVariadic() {
				values = f.call.CallSlice(values)
			} else {
				values = f.call.Call(values)
			}

			f.ReturnValues = []interface{}{}
			for i := range values {
				f.ReturnValues = append(f.ReturnValues, values[i].Interface())
			}
		}

		timeout = f.timeout

		if f.PanicValue != nil {
			panic(f.PanicValue)
		}

		// Return to arguments
		for _, r := range f.ReturnToArguments {
			arg := arguments[r.Argument]
			argTyp := reflect.TypeOf(arg)
			argElem := reflect.ValueOf(arg).Elem()
			typ := reflect.TypeOf(r.Value)
			if typ.Kind() == reflect.Ptr {
				if typ == argTyp {
					// *type vs *type
					argElem.Set(reflect.ValueOf(r.Value).Elem())
				} else {
					// *type vs **type
					argElem.Set(reflect.ValueOf(r.Value))
				}
			} else {
				if typ == argTyp.Elem() {
					// type vs *type
					argElem.Set(reflect.ValueOf(r.Value))
				} else {
					// type vs **type
					value := reflect.New(typ).Elem()
					value.Set(reflect.ValueOf(r.Value))
					argElem.Set(value.Addr())
				}
			}
		}

		return &MockResult{f.ReturnValues}
	}

	var msg string
	if len(arguments) == 0 {
		msg = fmt.Sprintf("Mock call missing for %s()", functionName)
	} else {
		argsStr := pretty.Sprintf("%# v", arguments)
		argsStr = argsStr[15 : len(argsStr)-1]
		msg = fmt.Sprintf("Mock call missing for %s(%s)", functionName, argsStr)
	}
	panic(msg)
}
1304963
func (p *PullRequest) GetNumber() int {
	if p == nil || p.Number == nil {
		return 0
	}
	return *p.Number
}
169153
func (mr *MockClientMockRecorder) GetRegistrar() *gomock.Call {
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetRegistrar", reflect.TypeOf((*MockClient)(nil).GetRegistrar))
}
700677
func Caller() *Call {
	scope, entry := findScope()
	if scope == nil {
		return nil
	}
	return &Call{
		scope: scope,
		entry: entry,
	}
}
703202
func evalFromCall(expr ast.Node, context Context) (interface{}, callSite, error) {
	//fmt.Println(reflect.TypeOf(expr), time.Now().UnixNano()/int64(10000), expr)
	switch expr.(type) {
	case *ast.Ident:
		i, e := evalIdentFromCall(expr.(*ast.Ident), context)
		return i, callSite{isValid: false}, e
	case *ast.SelectorExpr:
		return evalSelectorExprCall(expr.(*ast.SelectorExpr), context)
	default:
		i, e := eval(expr, context)
		return i, callSite{isValid: false}, e
	}
}
359320
func (mock *HttpClientMock) GetCalls() []struct {
	URL string
} {
	var calls []struct {
		URL string
	}
	lockhttpClientMockGet.RLock()
	calls = mock.calls.Get
	lockhttpClientMockGet.RUnlock()
	return calls
}
1054184
func (ctrl *Controller) RecordCall(receiver interface{}, method string, args ...interface{}) *Call {
	ctrl.T.Helper()

	recv := reflect.ValueOf(receiver)
	for i := 0; i < recv.Type().NumMethod(); i++ {
		if recv.Type().Method(i).Name == method {
			return ctrl.RecordCallWithMethodType(receiver, method, recv.Method(i).Type(), args...)
		}
	}
	ctrl.T.Fatalf("gomock: failed finding method %s on %T", method, receiver)
	panic("unreachable")
}
823474
func (f CallerFunc) Call(ctx context.Context, c *scheduler.Call) (mesos.Response, error) {
	return f(ctx, c)
}
1200764
func GetMacroRecall(c ConfusionMatrix) float64 {
	recallVals := 0.0
	for k := range c {
		recallVals += GetRecall(k, c)
	}
	return recallVals / float64(len(c))
}
972511
func (s *Server) safelyCall(function reflect.Value, args []reflect.Value) (resp []reflect.Value, e interface{}) {
	defer func() {
		if err := recover(); err != nil {
			if !s.Config.RecoverPanic {
				// go back to panic
				panic(err)
			} else {
				e = err
				resp = nil
				s.Logger.Println("Handler crashed with error", err)
				for i := 1; ; i += 1 {
					_, file, line, ok := runtime.Caller(i)
					if !ok {
						break
					}
					s.Logger.Println(file, line)
				}
			}
		}
	}()
	return function.Call(args), nil
}
369058
func (_Chequebook *ChequebookCallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error {
	return _Chequebook.Contract.contract.Call(opts, result, method, params...)
}
788726
func getOncallData(c context.Context, name, url string) (ui.Oncall, error) {
	result := ui.Oncall{}
	err := getJSONData(c, url, 10*time.Minute, &result)
	// Set the name, this is not loaded from the sheriff JSON.
	result.Name = name
	return result, err
}
1210179
func (client *lockRESTClient) restCall(call string, args dsync.LockArgs) (reply bool, err error) {

	reader := bytes.NewBuffer(make([]byte, 0, 2048))
	err = gob.NewEncoder(reader).Encode(args)
	if err != nil {
		return false, err
	}
	respBody, err := client.call(call, nil, reader, -1)
	if err != nil {
		return false, err
	}

	var resp lockResponse
	defer http.DrainBody(respBody)
	err = gob.NewDecoder(respBody).Decode(&resp)

	if err != nil || !resp.Success {
		reqInfo := &logger.ReqInfo{}
		reqInfo.AppendTags("resource", args.Resource)
		reqInfo.AppendTags("serveraddress", args.ServerAddr)
		reqInfo.AppendTags("serviceendpoint", args.ServiceEndpoint)
		reqInfo.AppendTags("source", args.Source)
		reqInfo.AppendTags("uid", args.UID)
		ctx := logger.SetReqInfo(context.Background(), reqInfo)
		logger.LogIf(ctx, err)
	}
	return resp.Success, err
}
637030
func (r Rule) Caller(caller calls.Caller) Rule {
	return Rules{r, Call(caller)}.Eval
}
284459
func (mr *MockEventInterfaceMockRecorder) GetFieldSelector(arg0, arg1, arg2, arg3 interface{}) *gomock.Call {
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetFieldSelector", reflect.TypeOf((*MockEventInterface)(nil).GetFieldSelector), arg0, arg1, arg2, arg3)
}