We use this method to aviod to table lookups for the same hashcode; which is what we would have to do if we did
a get and then a create if the value is null.
167221
private TupleList getOrCreate(final Tuple tuple) {
        final int hashCode = this.index.hashCodeOf( tuple, left );
        final int index = indexOf( hashCode, this.table.length );
        TupleList entry = (TupleList) this.table[index];

        // search to find an existing entry
        while ( entry != null ) {
            if ( matches( entry, tuple, hashCode, !left ) ) {
                return entry;
            }
            entry = entry.getNext();
        }

        // entry does not exist, so create
        entry = this.index.createEntry( tuple, hashCode, left );
        entry.setNext( (TupleList) this.table[index] );
        this.table[index] = entry;

        if ( this.size++ >= this.threshold ) {
            resize( 2 * this.table.length );
        }
        return entry;
    }
474497
function hashHas(key) {
              var data = this.__data__;
              return _nativeCreate ? (data[key] !== undefined) : hasOwnProperty$6.call(data, key);
            }
905221
def lookupChdbid( tableName, dbid=nil )
      getSchema(dbid) if dbid
      unmodifiedTableName = tableName.dup
      @chdbid = findElementByAttributeValue( @chdbids, "name", formatChdbidName( tableName ) )
      if @chdbid
         @dbid = @chdbid.text
         return @dbid
      end
      if @chdbids
         chdbidArray = findElementsByAttributeName( @chdbids, "name" )
         chdbidArray.each{ |chdbid|
            if chdbid.has_text?
               dbid = chdbid.text
               getSchema( dbid )
               name = getResponseElement( "table/name" )
               if name and name.has_text? and name.text.downcase == unmodifiedTableName.downcase
                  @chdbid = chdbid
                  @dbid = dbid
                  return @dbid
               end
            end
         }
      end
      nil
   end
157975
private V putImpl(K key, V value)
  {
    V item = null;

    int hash = key.hashCode() & _mask;
    int count = _values.length;

    for (; count > 0; count--) {
      item = _values[hash];

      // No matching item, so create one
      if (item == null) {
        _keys[hash] = key;
        _values[hash] = value;
        _size++;

        return null;
      }

      // matching item gets replaced
      if (_keys[hash].equals(key)) {
        _values[hash] = value;

        return item;
      }

      hash = (hash + 1) & _mask;
    }

    throw new IllegalStateException();
  }
1061800
@Override
	public Object lookup(Name name) throws NamingException
    {
        if (name.isEmpty())
            return new FFMQJNDIContext(env, bindings);

        // Extract components that belong to this namespace
        String nm = name.toString();

        // Find object in internal hash table
        Object answer = bindings.get(nm);
        if (answer == null)
        {
        	// Dynamic queue or topic lookup
        	if (nm.startsWith("queue/") && nm.length() > 6)
        		return new QueueRef(nm.substring(nm.indexOf('/')+1));
        	if (nm.startsWith("topic/") && nm.length() > 6)
        		return new TopicRef(nm.substring(nm.indexOf('/')+1));
        	
            throw new NameNotFoundException(name + " not found");
        }

        return answer;
    }
611090
@Override
    public void visitCode(Code obj) {
        forLoops = new HashSet<>();
        super.visitCode(obj);
        forLoops = null;
    }
724019
private static String joinAndGetValue(List<Field> fields, String sep,
                List<Object> values, Object obj, boolean isWithNullValue) {
	    return joinAndGetValueForInsert(fields, sep, null, values, obj, isWithNullValue);
    }
96206
public TldFernFeature lookupFern( int value ) {
		TldFernFeature found = table[value];
		if( found == null ) {
			found = createFern();
			found.init(value);
			table[value] = found;
		}
		return found;
	}
831468
@Nullable
    public V get() {
        if (!valueRetrieved) {
            cacheValue = databaseReader.get();
            valueRetrieved = true;
        }
        return cacheValue;
    }
133315
def _try_lookup(table, value, default = ""):
    
    try:
        string = table[ value ]
    except KeyError:
        string = default
    return string
287809
@SuppressWarnings("unchecked")
    public V put(final int key, final V value)
    {
        requireNonNull(value, "null values are not supported");

        V evictedValue = null;
        @DoNotSub final int setNumber = Hashing.hash(key, mask);
        @DoNotSub final int setBeginIndex = setNumber << setSizeShift;
        @DoNotSub int i = setBeginIndex;

        for (@DoNotSub int nextSetIndex = setBeginIndex + setSize; i < nextSetIndex; i++)
        {
            if (null == values[i])
            {
                break;
            }

            if (key == keys[i])
            {
                evictedValue = (V)values[i];
                shuffleUp(i, nextSetIndex - 1);

                break;
            }
        }

        if (null == evictedValue)
        {
            evictedValue = (V)values[setBeginIndex + (setSize - 1)];
        }

        shuffleDown(setBeginIndex);

        keys[setBeginIndex] = key;
        values[setBeginIndex] = value;

        cachePuts++;

        if (null != evictedValue)
        {
            evictionConsumer.accept(evictedValue);
        }
        else
        {
            ++size;
        }

        return null;
    }
1233252
private long put(K key, long value, boolean ifNew)
  {
    if (key == null) {
      long old = _nullValue;
      _nullValue = value;
      return old;
    }

    int hash = key.hashCode() & _mask;

    while (true) {
      K testKey = _keys[hash];

      if (testKey == null || (_flags[hash] & DELETED) != 0) {
        _keys[hash] = key;
        _values[hash] = value;
        _flags[hash] = 0;

        _size++;

        if (_keys.length <= 2 * _size)
          resize(2 * _keys.length);

        return NULL;
      }
      else if (key != testKey && ! testKey.equals(key)) {
        hash = (hash + 1) & _mask;
        continue;
      }
      else if (ifNew) {
        return _values[hash];
      }
      else {
        long old = _values[hash];

        _values[hash] = value;

        return old;
      }
    }
  }
356724
public int get(Object key)
  {
    if (key == null)
      key = NULL_KEY;

    int hash = key.hashCode() & _mask;

    for (Item item = _entries[hash]; item != null; item = item._next) {
      Object itemKey = item._key;
      
      if (itemKey == key || itemKey.equals(key))
        return item._value;
    }

    return NULL;
  }
433825
public boolean destinationExists(JsDestinationAddress addr) throws SIMPNullParameterException
    {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(tc, "destinationExists", new Object[] { addr });

        // Now look for the destination in the hash table
        boolean exists = destinationExists(addr.getDestinationName(), addr.getBusName());

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(tc, "destinationExists", new Boolean(exists));

        return exists;
    }
1316560
public AbstractSpecWithPrimaryKey<T> withPrimaryKey(String hashKeyName, Object hashKeyValue) {
        if (hashKeyName == null)
            throw new IllegalArgumentException();
        withPrimaryKey(new PrimaryKey(hashKeyName, hashKeyValue));
        return this;
    }
755391
@Override
    public V replace(K key, V value) {
        int hash = hash(key);
        if (value == null) {
          throw new NullPointerException();
        }
        Segment<K,V> s = segmentForHash(hash);
        return s == null ? null : s.replace(key, hash, value);
    }
1304560
function hashHas(key) {
    var data = this.__data__;
    return nativeCreate ? data[key] !== undefined : hasOwnProperty.call(data, key);
  }