Try to get element from cache,
@param port
@returns {*}
@private
506116
function(port) {

            if (this._portElementsCache[port.id]) {
                return this._portElementsCache[port.id].portElement;
            }
            return this._createPortElement(port);
        }
402664
function(node) {
    for (var i = 0; i < ResourceCache._cached.length; i++) {
      if (ResourceCache._cached[i].node === node) {
        return ResourceCache._cached[i].resource;
      }
    }
    return null;
  }
52984
public Element getWithData(Ehcache cache, Object key, A data) {
        this.threadData.set(data);
        try {
            return cache.get(key);
        } finally {
            this.threadData.remove();
        }
    }
1193772
function(key) {
      if (!cache) return null;
      var cached = cache.get(key);
      if (cached) console.log('cache hit: %s', key);
      return cached;
    }
288764
private final synchronized CacheElement getCacheElement(String userid) {
        String m = getCacheAbbrev() + " getCacheElement() ";
        CacheElement cacheElement = null;
        String key = getKey(userid);
        logger.debug(m + "key==" + key);
        if (cache.containsKey(key)) {
            logger.debug(m + "cache already has element");
        } else {
            logger.debug(m + "cache does not have element; create and put");
            CacheElement itemtemp =
                    new CacheElement(userid, getCacheId(), getCacheAbbrev());
            cache.put(key, itemtemp);
        }
        cacheElement = (CacheElement) cache.get(key);
        if (cacheElement == null) {
            logger.error(m + "cache does not contain element");
        } else {
            logger.debug(m + "element retrieved from cache successfully");
        }
        return cacheElement;
    }
491116
function parseInteger (name, port) {
  const portNumber = Number(port)
  if (!portNumber) {
    console.error(`Provided ${name} must be an integer`)
    process.exit(1)
  }
  return portNumber
}
1367682
public void get(Object rootVal,
                  MatchSpaceKey msg,
                  EvalCache cache,
                  Object contextValue,
                  SearchResults result)
    throws MatchingException,BadMessageFormatMatchingException
  {
    if (tc.isEntryEnabled())
	    tc.entry(this,cclass, "get", new Object[]{rootVal,msg,cache,result});

    if (result instanceof CacheingSearchResults)
      ((CacheingSearchResults) result).setMatcher(vacantChild);
    vacantChild.get(null, msg, cache, contextValue, result);

    if (tc.isEntryEnabled())
	    tc.exit(this,cclass, "get");
  }
116709
function cached (fn) {
  var cache = Object.create(null);
  return (function cachedFn (str) {
    var hit = cache[str];
    return hit || (cache[str] = fn(str))
  })
}
1334748
function listen(port, cb) {
    return new Promise((resolve, reject) => {
        let completed = ssocket_helpers.createSimplePromiseCompletedAction(resolve, reject);
        try {
            let serverToClient;
            let server = Net.createServer((connectionWithClient) => {
                try {
                    if (cb) {
                        cb(null, createServer(connectionWithClient));
                    }
                }
                catch (e) {
                    if (cb) {
                        cb(e);
                    }
                }
            });
            let isListening = false;
            server.once('error', (err) => {
                if (!isListening && err) {
                    completed(err);
                }
            });
            server.on('listening', () => {
                isListening = true;
                completed(null, server);
            });
            server.listen(port);
        }
        catch (e) {
            completed(e);
        }
    });
}
511261
function(callback) {
        var step = 0

        async.whilst(
          function() {
            return ++step <= pp.options.extra
          },
          function(callback) {
            pp.tryPorts = []
            var c = grunt.config.get('port-pick-' + step)

            // With multiple tasks, do not find a port that we've already found
            // in a previous task
            if(c) {
              callback()
              return
            }

            async.waterfall([
              pp.findPort,

              function(selectedPort, callback) {
                if(selectedPort === false)
                  grunt.fatal('No available port was found')

                grunt.config.set('port-pick-' + this.step, selectedPort)
                grunt.log.writeln( '>> '.green + 'port-pick-' + this.step + '=' +
                  selectedPort)

                callback()
              }.bind({step: step})
            ],
            function(err) {
              callback()
            })
          },
          function(err) {
            done()
          }
        )
      }
466419
function krampus (port) {
  if (!num(port)) {
    return Promise.reject('port must be a number')
  }

  return lsofi(port)
    .then(pid => {
      if (pid === null) {
        return [port]
      }
      return kill(pid)
        .then(() => [port, pid])
    })
}
255609
function cache(source) {
    var _err = Nil
    var _value = Nil
    var _result = null
    var listeners = null

    return function continuable(callback) {
        if (_err !== Nil || _value !== Nil) {
            callback(_err, _value)
        } else if (listeners) {
            listeners.push(callback)
        } else {
            listeners = [callback]
            _result = source(function (err, value) {
                _err = err
                _value = value

                listeners.forEach(function (l) { l(err, value) })
            })
        }

        return _result
    }
}
939702
function get(req) {
        var cache = caches[this.name];
        var returnVal = null;

        if (cache && !redisOffline) {
            try {
                returnVal = cache.get(req.key);
            }
            catch (err) {
                console.log('redis get err: ' + err);
            }
        }

        return new Q(returnVal);
    }
1275703
@Override
    public Object get(String key) {
        Element element = cache.get(key);
        if (element != null) {
            return element.getObjectValue();
        }
        return null;
    }
249389
function getPort(url) {
    // URL may contain the port number after the second colon.
    // http://domain:1234/
    var index = url.indexOf(":", 6); // skipping 6 characters to ignore first colon
    return index < 0 ? 80 : parseInt(url.substr(index + 1), 10);
  }
939078
function isLegalPort(port: number) : boolean {
  if (typeof port === 'string' && port.trim() === '') {
    return false;
  }
  return +port === (port >>> 0) && port >= 0 && port <= 0xFFFF;
}
1127088
function get(key) {
            try {
                if (key !== undefined) {
                    var result = encodeObjectString(STORE.getItem(storeName + key));
                    return result !== null ? result : false;
                } else {
                    var resultAll = {};

                    Object.keys(STORE).map(function(key) {
                        if (key.indexOf(storeName) === 0 && key.indexOf(EXPIRE_KEY) === -1) {
                            var varKey = key.replace(storeName, '');
                            resultAll[varKey] = get(varKey);
                        }
                    });

                    return resultAll;
                }
            } catch(error) {
                console.error(error)
                return false;
            }
        }