Lookup if that object already exits in the i-ref table
and return it's ID, using it's values and not it's contents.
969701
function( propertyTable, eid ) {
		// Check if we have a BST for this type
		if (this.indexVal[eid] !== undefined) {
			var id = this.indexVal[eid].search( propertyTable );
			if (id.length > 0) return id[0];
		}
		// We don't have the item or the BST
		return -1;
	}
645810
function reref(obj,options) {
    let master = obj;
    recurse(obj,{identityDetection:true},function(obj,key,state){
        if (state.identity) {
            let replacement = jptr(master,state.identityPath);
            // ensure it's still there and we've not reffed it away
            let newRef = state.identityPath;
            if (state.identityPath !== state.path) {
                if (options && options.prefix) newRef = newRef.replace('#/',options.prefix);
                if (replacement !== false) obj[key] = { $ref: newRef }
                else if (options && options.verbose) console.warn(state.identityPath,'gone away at',state.path);
            }
        }
    });
    return obj;
}
1350074
def getobject_use_prevfield(idf, idfobject, fieldname):
    """"""
    if not fieldname.endswith("Name"):
        return None
    # test if prevfieldname ends with "Object_Type"
    fdnames = idfobject.fieldnames
    ifieldname = fdnames.index(fieldname)
    prevfdname = fdnames[ifieldname - 1]
    if not prevfdname.endswith("Object_Type"):
        return None
    objkey = idfobject[prevfdname].upper()
    objname = idfobject[fieldname]
    try:
        foundobj = idf.getobject(objkey, objname)
    except KeyError as e:
        return None
    return foundobj
562941
function byIdRefKey(id, ref, key, extra) {
      var text = tiaEJ.getTextByLocKey(key, extra);
      var cmp = this.search.byIdRef(id, ref);
      var resItem = this.search.byText(cmp, text, 'container id: ' + id + ', reference: ' + ref);
      return resItem;
    }
20521
function getId(id){
        if(_.isObject(id) && !_.isUndefined(id.id)){
            if (objectIdRegex.test(id.id)) {
                id = id.id;
            }
            else {
                id = null;
            }
        }
        return id;
    }
1056328
def identify(self, obj):
    """"""
    hash_ = hash(obj)
    type_id = self.to_id(type(obj))
    return (hash_, TypeId(type_id))
941428
function(record) {

		if (Lava.schema.DEBUG && !(record.guid in this._properties_by_guid)) Lava.t("isLess: record does not belong to this module");
		var ref_record_a = this._properties_by_guid[record.guid][this._name];
		// must return undefined, cause comparison against nulls behaves differently
		return ref_record_a ? ref_record_a.get('id') : void 0;

	}
824904
def parse_object_ref(ref)
      prefix = ref[1]
      ref = ref[0]
      # Let's make sure the value isn't nil. If it is, return the default Hash.
      return {} if ref.nil?
      class_name =
        if ref.respond_to?(:haml_object_ref)
          ref.haml_object_ref
        else
          underscore(ref.class)
        end
      ref_id =
        if ref.respond_to?(:to_key)
          key = ref.to_key
          key.join('_') unless key.nil?
        else
          ref.id
        end
      id = "#{class_name}_#{ref_id || 'new'}"
      if prefix
        class_name = "#{ prefix }_#{ class_name}"
        id = "#{ prefix }_#{ id }"
      end

      { 'id'.freeze => id, 'class'.freeze => class_name }
    end
352987
def get_object_id(obj):
    """"""
    try:
        idx = objIds.index(obj)
        return idx + 1
    except ValueError:
        objIds.append(obj)
        return len(objIds)
1206285
def discardID(self, idVal):
        
        for i in self:
            if i.id == idVal:
                self._collection.discard(i)
                return
146660
function getId(record) {
    Validate.isObject(record);
    Validate.notNull(record);

    for (var property in record) {
        if (property.toLowerCase() === idPropertyName.toLowerCase()) {
            return record[property];
        }
    }
}
801558
protected Object addOrRemove(int intKey, Object objectValue,
                                 boolean remove) {

        int    hash        = intKey;
        int    index       = hashIndex.getHashIndex(hash);
        int    lookup      = hashIndex.hashTable[index];
        int    lastLookup  = -1;
        Object returnValue = null;

        for (; lookup >= 0;
                lastLookup = lookup,
                lookup = hashIndex.getNextLookup(lookup)) {
            if (intKey == intKeyTable[lookup]) {
                break;
            }
        }

        if (lookup >= 0) {
            if (remove) {
                if (intKey == 0) {
                    hasZeroKey   = false;
                    zeroKeyIndex = -1;
                }

                intKeyTable[lookup]      = 0;
                returnValue              = objectValueTable[lookup];
                objectValueTable[lookup] = null;

                hashIndex.unlinkNode(index, lastLookup, lookup);

                if (accessTable != null) {
                    accessTable[lookup] = 0;
                }

                return returnValue;
            }

            if (isObjectValue) {
                returnValue              = objectValueTable[lookup];
                objectValueTable[lookup] = objectValue;
            }

            if (accessTable != null) {
                accessTable[lookup] = accessCount++;
            }

            return returnValue;
        }

        // not found
        if (remove) {
            return returnValue;
        }

        if (hashIndex.elementCount >= threshold) {
            if (reset()) {
                return addOrRemove(intKey, objectValue, remove);
            } else {
                return null;
            }
        }

        lookup              = hashIndex.linkNode(index, lastLookup);
        intKeyTable[lookup] = intKey;

        if (intKey == 0) {
            hasZeroKey   = true;
            zeroKeyIndex = lookup;
        }

        objectValueTable[lookup] = objectValue;

        if (accessTable != null) {
            accessTable[lookup] = accessCount++;
        }

        return returnValue;
    }
234422
def get(self, instance, aslist=False, **kwargs):
        
        refs = self.get_versioned_references_for(instance)

        if not self.multiValued:
            if len(refs) > 1:
                logger.warning("Found {} references for non-multivalued "
                               "reference field '{}' of {}".format(
                                   len(refs), self.getName(), repr(instance)))
            if not aslist:
                if refs:
                    refs = refs[0]
                else:
                    refs = None

        if not self.referencesSortable or not hasattr(
                aq_base(instance), "at_ordered_refs"):
            return refs

        refs = instance.at_ordered_refs
        order = refs[self.relationship]
        if order is None:
            return refs

        by_uid = dict(map(lambda ob: (api.get_uid(ob), ob), refs))
        return [by_uid[uid] for uid in order if uid in by_uid]
1357864
def get_ref(self, reftype, index):
        """"""
        try:
            got_reftype, data = self.refs[int(index)]
        except (IndexError, ValueError):
            raise CoconutInternalException("no reference at invalid index", index)
        internal_assert(got_reftype == reftype, "wanted " + reftype + " reference; got " + got_reftype + " reference")
        return data
1304090
def _find_toc_node(toc, ref_id, objtype):
    
    for check_node in toc.traverse(nodes.reference):
        if objtype == nodes.section and (
            check_node.attributes["refuri"] == ref_id
            or check_node.attributes["anchorname"] == "#" + ref_id
        ):
            return check_node
        if (
            objtype == addnodes.desc
            and check_node.attributes["anchorname"] == "#" + ref_id
        ):
            return check_node
    return None
954646
def deprecate(old, new, reference: '', ids: [])
      return if @ignored.include?('deprecations') || (@ignored & ids.map!(&:to_s)).any?

      msg = ids.empty? ? '' : "[#{ids.map(&:inspect).join(', ')}] "
      ref_msg = reference.empty? ? '.' : "; see explanation for this deprecation: #{reference}."
      warn "[DEPRECATION] #{msg}#{old} is deprecated. Use #{new} instead#{ref_msg}"
    end
656785
def reference_id_parts(reference_id):
    
    m = consts.REFERENCE_ID_PATTERN.match(reference_id)
    if m:
        return m.groups()
    raise ValueError('Illegal reference identifier: "%s"' % reference_id)