// IsAncestor returns true if the receiver is an ancestor of the given
// other value.
540709
func (m ModuleInstance) IsAncestor(o ModuleInstance) bool {
	// Longer or equal sized paths means the receiver cannot
	// be an ancestor of the given module insatnce.
	if len(m) >= len(o) {
		return false
	}

	for i, ms := range m {
		if ms.Name != o[i].Name {
			return false
		}
		if ms.InstanceKey != NoKey && ms.InstanceKey != o[i].InstanceKey {
			return false
		}
	}

	return true
}
71282
func (node *blockNode) RelativeAncestor(distance int32) *blockNode {
	return node.Ancestor(node.height - distance)
}
1095191
func (t Type) IsAlias() bool {
	if t.IsMultipleInheritance() || t.IsArray() || t.IsUnion() || t.TypeString() == "object" {
		return false
	}
	return t.TypeString() != "" && len(t.Properties) == 0
}
997388
func (c *cluster) isCoordinator() bool {
	c.mu.RLock()
	defer c.mu.RUnlock()
	return c.unprotectedIsCoordinator()
}
321338
func isRelativeJSONPointer(v interface{}) bool {
	s, ok := v.(string)
	if !ok {
		return false
	}
	if s == "" {
		return false
	}
	if s[0] == '0' {
		s = s[1:]
	} else if s[0] >= '0' && s[0] <= '9' {
		for s != "" && s[0] >= '0' && s[0] <= '9' {
			s = s[1:]
		}
	} else {
		return false
	}
	return s == "#" || isJSONPointer(s)
}
490657
func IsExactlySinglePointer(target interface{}) bool {
	//	va, isVa := target.(reflect.Value)
	//	if isVa {
	//		return IsExactlySinglePointerType(va.Type())
	//	}
	typ := reflect.ValueOf(target).Type()
	return IsExactlySinglePointerType(typ)
}
1115891
func (w *Waker) IsAsserted() bool {
	return (*Sleeper)(atomic.LoadPointer(&w.s)) == &assertedSleeper
}
1362899
func IsExist(err error) bool {
	err = errors.Cause(err)
	if os.IsExist(err) {
		return true
	}
	switch pe := err.(type) {
	case nil:
		return false
	case *os.PathError:
		err = pe.Err
	case *os.LinkError:
		err = pe.Err
	case *os.SyscallError:
		err = pe.Err
	}
	return err == error_DIR_NOT_EMPTY
}
163522
func IsServiceNotFoundError(err error) bool {
	cause := errors.Cause(err)
	if nErr, ok := cause.(ServiceNotFoundError); ok {
		return nErr.ServiceNotFoundError()
	}

	return false
}
818782
func (e *ErrorClass) Is(parent *ErrorClass) bool {
	for check := e; check != nil; check = check.parent {
		if check == parent {
			return true
		}
	}
	return false
}
198539
func isArchived(c context.Context, task *logdog.ArchiveTask) bool {
	var err error
	defer func() {
		if err != nil {
			logging.WithError(err).Errorf(c, "while checking if %s/%s is archived", task.Project, task.Id)
		}
	}()
	if c, err = info.Namespace(c, "luci."+task.Project); err != nil {
		return false
	}
	state := (&coordinator.LogStream{ID: coordinator.HashID(task.Id)}).State(c)
	if err = datastore.Get(c, state); err != nil {
		return false
	}
	return state.ArchivalState() == coordinator.ArchivedComplete
}
290243
func (db *SnapshotDB) IsInternalService(c context.Context, hostname string) (bool, error) {
	if db.internalServices == nil {
		return false, nil
	}
	return db.internalServices.MatchString(hostname), nil
}
337214
func parentExists(ifaceStr string) bool {
	_, err := ns.NlHandle().LinkByName(ifaceStr)
	if err != nil {
		return false
	}

	return true
}
108783
func (group *ExampleGroup) ReverseAncestors() []*ExampleGroup {
	reversed := []*ExampleGroup{}
	ancestors := group.Ancestors()
	for i := len(ancestors) - 1; i >= 0; i-- {
		reversed = append(reversed, ancestors[i])
	}
	return reversed
}
304605
func HasOwnerReference(pod *corev1.Pod, build *buildv1.Build) bool {
	ref := makeOwnerReference(build)

	for _, r := range pod.OwnerReferences {
		if reflect.DeepEqual(r, ref) {
			return true
		}
	}

	return false
}
559724
func IsCleanPointerError(err error) bool {
	if e, ok := err.(interface {
		CleanPointerError() bool
	}); ok {
		return e.CleanPointerError()
	}
	if parent := parentOf(err); parent != nil {
		return IsCleanPointerError(parent)
	}
	return false
}
144391
func (em *clientEventMonitor) IsActive() bool {
	em.Lock()
	defer em.Unlock()

	return em.active
}