// GetClosedIssues returns the ClosedIssues field if it's non-nil, zero value otherwise.
775299
func (m *Milestone) GetClosedIssues() int {
	if m == nil || m.ClosedIssues == nil {
		return 0
	}
	return *m.ClosedIssues
}
510739
func GetFalseNegatives(class string, c ConfusionMatrix) float64 {
	ret := 0.0
	for k := range c[class] {
		if k == class {
			continue
		}
		ret += float64(c[class][k])
	}
	return ret
}
940564
func resourceClosed() error {
	if !resourceDebugEnabled {
		return errors.New("resource closed")
	}

	var buf [4096]byte
	return fmt.Errorf("resource closed:\n%s", buf[:runtime.Stack(buf[:], false)])
}
661340
func (lf *lockFile) IsClosed() bool {
	lf.Lock()
	defer lf.Unlock()
	return lf.f == syscall.InvalidHandle
}
309930
func GetIssueUsers(rid, uid int64, isClosed bool) ([]*IssueUser, error) {
	ius := make([]*IssueUser, 0, 10)
	err := x.Where("is_closed=?", isClosed).Find(&ius, &IssueUser{RepoID: rid, UID: uid})
	return ius, err
}
361219
func (c *Client) GetVolumeFolders() (Refs, error) {
	volumeFolders, err := c.api.GetVolumeFolders()
	if err != nil {
		return nil, err
	}
	return volumeFolders.Folders, nil
}
621772
func IsCloseError(err error, codes ...int) bool {
	if e, ok := err.(*CloseError); ok {
		for _, code := range codes {
			if e.Code == code {
				return true
			}
		}
	}
	return false
}
1257324
func (i *Issue) GetClosedAt() time.Time {
	if i == nil || i.ClosedAt == nil {
		return time.Time{}
	}
	return *i.ClosedAt
}
1211535
func findClosestCommands(command string) []string {
	var closestCommands []string
	for _, value := range commandsTree.PrefixMatch(command) {
		closestCommands = append(closestCommands, value.(string))
	}
	sort.Strings(closestCommands)
	// Suggest other close commands - allow missed, wrongly added and even transposed characters
	for _, value := range commandsTree.Walk(commandsTree.Root()) {
		if sort.SearchStrings(closestCommands, value.(string)) < len(closestCommands) {
			continue
		}
		// 2 is arbitrary and represents the max allowed number of typed errors
		if words.DamerauLevenshteinDistance(command, value.(string)) < 2 {
			closestCommands = append(closestCommands, value.(string))
		}
	}
	return closestCommands
}
285092
func (h *Heap) IsClosed() bool {
	h.lock.RLock()
	defer h.lock.RUnlock()
	if h.closed {
		return true
	}
	return false
}
732672
func (i *InstallationPermissions) GetIssues() string {
	if i == nil || i.Issues == nil {
		return ""
	}
	return *i.Issues
}
718661
func (d *Death) closeInMass(closable ...io.Closer) (err error) {

	count := len(closable)
	sentToClose := make(map[int]closer)
	//call close async
	doneClosers := make(chan closer, count)
	for i, c := range closable {
		name, pkgPath := getPkgPath(c)
		closer := closer{Index: i, C: c, Name: name, PKGPath: pkgPath}
		go d.closeObjects(closer, doneClosers)
		sentToClose[i] = closer
	}

	// wait on channel for notifications.
	timer := time.NewTimer(d.timeout)
	failedClosers := []closer{}
	for {
		select {
		case <-timer.C:
			s := "failed to close: "
			pkgs := []string{}
			for _, c := range sentToClose {
				pkgs = append(pkgs, fmt.Sprintf("%s/%s", c.PKGPath, c.Name))
				d.log.Error("Failed to close: ", c.PKGPath, "/", c.Name)
			}
			return fmt.Errorf("%s", fmt.Sprintf("%s %s", s, strings.Join(pkgs, ", ")))
		case closer := <-doneClosers:
			delete(sentToClose, closer.Index)
			count--
			if closer.Err != nil {
				failedClosers = append(failedClosers, closer)
			}

			d.log.Debug(count, " object(s) left")
			if count != 0 || len(sentToClose) != 0 {
				continue
			}

			if len(failedClosers) != 0 {
				errString := generateErrString(failedClosers)
				return fmt.Errorf("errors from closers: %s", errString)
			}

			return nil
		}
	}
}
756745
func (c *ShardedClient) GetSentinels(keys []string) map[string]GetResponse {
	return c.getMulti(c.manager.GetShardsForSentinelsFromKeys(keys))
}
628504
func (f *FIFO) IsClosed() bool {
	f.closedLock.Lock()
	defer f.closedLock.Unlock()
	if f.closed {
		return true
	}
	return false
}
1002278
func (api *KrakenApi) ClosedOrders(args map[string]string) (*ClosedOrdersResponse, error) {
	params := url.Values{}
	if value, ok := args["trades"]; ok {
		params.Add("trades", value)
	}
	if value, ok := args["userref"]; ok {
		params.Add("userref", value)
	}
	if value, ok := args["start"]; ok {
		params.Add("start", value)
	}
	if value, ok := args["end"]; ok {
		params.Add("end", value)
	}
	if value, ok := args["ofs"]; ok {
		params.Add("ofs", value)
	}
	if value, ok := args["closetime"]; ok {
		params.Add("closetime", value)
	}
	resp, err := api.queryPrivate("ClosedOrders", params, &ClosedOrdersResponse{})

	if err != nil {
		return nil, err
	}

	return resp.(*ClosedOrdersResponse), nil
}
853205
func (s *Sensu) GetStashesSlice(limit int, offset int) ([]interface{}, error) {
	return s.getList(fmt.Sprintf("stashes"), limit, offset)
}
833065
func (s *LocalStore) GetCertificates() ([]*Certificate, error) {
	storedData, err := s.get()
	if err != nil {
		return nil, err
	}

	return storedData.Certificates, nil
}