This function checks if a child entry is related to the parent entry.
        This is done by comparing the reference and sequence numbers.
5613
def _is_related(parent_entry, child_entry):
        ''''''
        if parent_entry.header.mft_record == child_entry.header.base_record_ref and \
           parent_entry.header.seq_number == child_entry.header.base_record_seq:
            return True
        else:
            return False
559788
function containsDeep(parent, child) {
        var node = child;
        while (node) {
            if (node == parent) return true;

            node = getParentNode(node);
        }
        return false;
    }
1227976
protected boolean doesParentMatch(final CSNodeWrapper parent, final CSNodeWrapper entityParent) {
        if (parent != null && entityParent != null) {
            if (parent.getId() != null && parent.getId().equals(entityParent.getId())) {
                return true;
            } else if (parent.getId() == null && entityParent.getId() == null && parent == entityParent) {
                return true;
            } else {
                return false;
            }
        } else if (parent == null && entityParent == null) {
            return true;
        } else {
            return false;
        }
    }
382326
@Override
    protected boolean hasChildren(final String relative) throws IOException {
        ZipFile zip = createZipFile();
        if (null == zip) {
            return false;
        }
        Enumeration<? extends ZipEntry> entries = zip.entries();
        while (entries.hasMoreElements()) {
            ZipEntry entry = entries.nextElement();
            if ((relative.equals("")) || entry.getName().startsWith(relative + File.separator)) {
                return true;
            }
        }

        zip.close();
        return false;
    }
388051
function (parentType, childType) {
        if (!jv._options.checkInheritance) {
            return true;
        }
        var typeRef = childType;
        while (!typeRef[jv._MD_BUILTIN]) {
            if (parentType == typeRef) {
                return true;
            }
            typeRef = typeRef[jv._MD_PARENTDEF];
        }
        jv._logError(jv.INHERITANCE_EXPECTED, [childType[jv._MD_TYPENAME], parentType[jv._MD_TYPENAME]]);
        return false;
    }
465976
def is_ancestor_of(self, other, include_self=False):
        """"""
        return other.is_descendant_of(self, include_self=include_self)
1345663
function compare(a, b) {
    if (Type.isString(a)) {
        return a === b;
    } else if (Type.isNumber(a)) {
        if (isNaN(a) || isNaN(b)) {
            return isNaN(a) === isNaN(b);
        }
        return a === b;
    } else if (Type.isBoolean(a)) {
        return a === b;
    } else if (Type.isDate(a) && Type.isDate(b)) {
        return a.getTime() === b.getTime();
    } else if (Type.isRegExp(a) && Type.isRegExp(b)) {
        return a.source === b.source;
    } else if (Type.isArray(a) && Type.isArray(b)) {
        // check references first
        if (a === b) {
            return true;
        }
        return a.every(function (item, index) {
            try {
                return compare(item, b[index]);
            } catch (e) {
                throw e;
            }
        });
    } else if (Type.isObject(a) && Type.isObject(b)) {
        var equal = [];
        // check references first
        if (a === b) {
            return true;
        }

        try {
            for (var key in a) {
                equal.push(compare(a[key], b[key]));
            }
        } catch (e) {
            throw e;
        }
        return equal.every(function (item) {
            return item === true;
        });
        /// compare undefined and nulls and nans
    } else if (a === b) {
        return true;
    }

    return false;
}
706926
function isAncestor(ancestor, descendant) {
	return ancestor
		&& descendant
		&& Boolean(ancestor.compareDocumentPosition(descendant) & Node.DOCUMENT_POSITION_CONTAINED_BY);
}
428074
private void isparentlogger(Logger logchannel) {

        // get all log channels
        List<Logger> referenz = getLoggers();
        Iterator<Logger> it_logger = referenz.iterator();
        while (it_logger.hasNext()) {
            Logger child_test = it_logger.next();
            // if the logchannel has the given logchannel as parent his loglevel is set to the parent one.
            if (logchannel.getName().equals(child_test.getParent().getName())) {
                isparentlogger(child_test);
                child_test.setLevel(null);
            }
        }
    }
769830
function isChild(child, parent) {
	while (child = child.parentNode) {
		if (child == parent) {
			return true;
		}
	}

	return false;
}
412530
private boolean isRelational(EntityMetadata m)
    {
        // if related via join table OR contains relations.
        return m.isRelationViaJoinTable() || (m.getRelationNames() != null && (!m.getRelationNames().isEmpty()));
    }
776481
def is_related_to(item, app_id, app_ver=None):
    """"""
    versionRange = item.get('versionRange')
    if not versionRange:
        return True

    for vR in versionRange:
        if not vR.get('targetApplication'):
            return True
        if get_related_targetApplication(vR, app_id, app_ver) is not None:
            return True
    return False
1100103
function sibling(node, selector, ancestry) {
            var parent = ancestry[0], listProp, keys, i, l, k, m;
            if (!parent) { return false; }
            keys = estraverse.VisitorKeys[parent.type];
            for (i = 0, l = keys.length; i < l; ++i) {
                listProp = parent[keys[i]];
                if (isArray(listProp)) {
                    for (k = 0, m = listProp.length; k < m; ++k) {
                        if (listProp[k] !== node && matches(listProp[k], selector, ancestry)) {
                            return true;
                        }
                    }
                }
            }
            return false;
        }
992235
public boolean isRelated(Class<? extends ElementBase> sourceClass, Class<? extends ElementBase> targetClass) {
        return getCardinality(sourceClass, targetClass).maxOccurrences > 0;
    }
159901
public boolean isParent(RegistryEntry registryEntry) {
		RegistryEntry entry = getParentRegistryEntry();
		while (entry != null) {
			if (entry.equals(registryEntry)) {
				return true;
			}
			entry = entry.getParentRegistryEntry();
		}
		return false;
	}
691060
public boolean isChildOf(GeometryIndex parentIndex, GeometryIndex childIndex) {
		return delegate.isChildOf(toDelegate(parentIndex), toDelegate(childIndex));
	}
967343
public boolean checkLocks( boolean exclusive,
                               int depth ) {
        if (checkParents(exclusive) && checkChildren(exclusive, depth)) {
            return true;
        }
        return false;
    }