/* IRedisKeys implementations
169001
@Override public synchronized Long del(final String ... keys) {
        long deleted = 0L;
        String key;
        for (int idx = 0; idx < keys.length; idx += 1) {
            key = keys[idx];
            timers.remove(key);
            expirations.remove(key);
            for (IRedisCache cache : caches) {
                if (cache.exists(key)) {
                    cache.remove(key);
                    keyModified(key);
                    deleted += 1L;
                    break;
                }
            }
        }
        return deleted;
    }
1014536
public static <K, V> ImmutableSetMultimap<K, V> indexToSetMultimapWithMultipleKeys(
      Iterable<? extends V> values, Function<? super V, ? extends Collection<? extends K>> keyFunction) {
    final ImmutableSetMultimap.Builder<K,V> ret = ImmutableSetMultimap.builder();

    for (final V value : values) {
      // nulls banned by contract
      //noinspection ConstantConditions
      for (K key : keyFunction.apply(value)) {
        ret.put(key, value);
      }
    }

    return ret.build();
  }
822258
function extendSourceKeys(sourceKeys, source, regexp) {
    for (var key in source) {
        if (!regexp || regexp.test(key)) {
            sourceKeys[key] = key;
        }
    }
}
29960
function hashHas(key) {
  var data = this.__data__;
  return _nativeCreate ? (data[key] !== undefined) : hasOwnProperty$4.call(data, key);
}
688112
@Override
  public Long sdiffstore(final byte[] dstkey, final byte[]... keys) {
    checkIsInMultiOrPipeline();
    client.sdiffstore(dstkey, keys);
    return client.getIntegerReply();
  }
1102721
function sortedHashKeys(obj, desc) {
		var keys = [];

		for (var key in obj)
			keys.push(key);

		return sort.call(keys, function(a,b) {
			return desc ? obj[b] - obj[a] : obj[a] - obj[b];
		});
	}
518797
function arrayLikeKeys(value, inherited) {
  var isArr = isArray_1(value),
      isArg = !isArr && isArguments_1(value),
      isBuff = !isArr && !isArg && isBuffer_1(value),
      isType = !isArr && !isArg && !isBuff && isTypedArray_1(value),
      skipIndexes = isArr || isArg || isBuff || isType,
      result = skipIndexes ? _baseTimes(value.length, String) : [],
      length = result.length;

  for (var key in value) {
    if ((inherited || hasOwnProperty$5.call(value, key)) &&
        !(skipIndexes && (
           // Safari 9 has enumerable `arguments.length` in strict mode.
           key == 'length' ||
           // Node.js 0.10 has enumerable non-index properties on buffers.
           (isBuff && (key == 'offset' || key == 'parent')) ||
           // PhantomJS 2 has enumerable non-index properties on typed arrays.
           (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||
           // Skip index properties.
           _isIndex(key, length)
        ))) {
      result.push(key);
    }
  }
  return result;
}
677486
function hasKey (obj, keys) {
    let o = obj;
    keys.slice(0,-1).forEach(function (key) {
        o = (o[key] || {});
    });

    let key = keys[keys.length - 1];
    return key in o;
}
573411
function(keys){

  console.log('\nInitializing keys in Redis...\n')

  keys.forEach(function(el,i){

    client.get(el.key, function(e,d){

      if(e) {
        console.log("Error trying to get %s ", el.key)
        return console.error(e)
      }

      // checking for falsey values only is a bad idea
      if(typeof d === 'undefined'){

        console.log("Not OK trying to get %s ", el.key)

        client.set(el.key, el.initialValue, function(e,d){
          if(e) {
            console.log("Error trying to set %s ", el.key)
            return console.error(e)
          }
          if(d !== 'OK') {
            console.log("Not OK trying to set %s ", el.key)
            return console.warn(el.key + " was not set.")
          }
          if(d === 'OK') {
            console.log("OK setting %s ", el.key)
            client.get(el.key, function(e,d){
             console.log(d) 
            })
          }

        }) // end set.
      }

      console.log("The value for key %s is %s", el.key.yellow, d.green)

    }) // end get

  })
}
1076862
@Override
	public IResource convert(final IResource resource) {
		final String sourceMethod = "convert"; //$NON-NLS-1$
		final boolean isTraceLogging = log.isLoggable(Level.FINER);
		if (isTraceLogging) {
			log.entering(sourceMethod, sourceMethod, new Object[]{resource});
		}
		IResource result = resource;

		if (!isSkipResourceConversion.get()) {
			if (!resource.isFolder()) {
				// is the request for a JavaScript file
				if (resource.getPath().endsWith(".js") && resource.getPath().length() > 3) { //$NON-NLS-1$
					if (!resource.exists()){
						// The requested javascript file doesn't exist.  See if we can satisfy the request
						// by converting a .jsx file.

						// Construct a resource object for the .jsx file with the same base name
						// and in the same directory as the requested javascript file.
						String path = resource.getReferenceURI().getPath();
						int idx = path.lastIndexOf("/"); //$NON-NLS-1$
						String name = path.substring(idx == -1 ? 0 : idx+1, path.length()-3) + ".jsx"; //$NON-NLS-1$
						IResource jsxRes = aggregator.newResource(resource.resolve(name));
						if (jsxRes.exists()) {
							ICache cache = aggregator.getCacheManager().getCache();
							try {
								IResourceConverterCache jsxCache = (IResourceConverterCache)cache.getCache(JSX_CACHE_NAME);
								if (jsxCache == null) {
									throw new NotFoundException(JSX_CACHE_NAME);
								}
								// Use the resource's reference uri as the cache key
								String cacheKey = resource.getReferenceURI().toString();
								// get the converted resource from the cache.
								jsxRes.setReferenceURI(resource.getReferenceURI());
								result = jsxCache.convert(cacheKey, jsxRes);
							} catch (IOException ex) {
								log.logp(Level.WARNING, sourceClass, sourceMethod, ex.getMessage(), ex);
								result = new ExceptionResource(resource.getReferenceURI(), resource.lastModified(), ex);
							}
						}
					}
				}
			} else {
				// It's a folder resource.  Wrap the folder resource so that we can override the
				// tree walker so as to make .jsx files in folder listings appear as .js files.
				return new FolderResourceWrapper(resource);
			}
		}
		if (isTraceLogging) {
			log.exiting(sourceClass, sourceMethod, result);
		}
		return result;
	}
535353
private void given(CharSequence s, int wanted, int got) {
        red.append(s);
        given += got;
        LOGGER.trace("Given: [" + wanted + "," + got + "]-" + s);
    }
167496
protected void insertNewKeyValueAt(int i, short key, Container value) {
    extendArray(1);
    System.arraycopy(keys, i, keys, i + 1, size - i);
    keys[i] = key;
    System.arraycopy(values, i, values, i + 1, size - i);
    values[i] = value;
    size++;
  }
545587
private static int computeKey(Collection array) {
        int intKey = 0;
        for (Object s : array) {
            intKey += s.hashCode();
        }
        return intKey;
    }
712761
function initRedis() {
    return when.promise((resolve, reject) => {
      redis.get(name, (err, res) => {
        if(err) {
          memStore = {};
        } else if(res) {
          memStore = JSON.parse(res);
        } else {
          memStore = {};
        }
        resolve(true);
      });
    });
  }
440563
function zincrby(key, increment, member, req) {
  var val = this.getKey(key, req);
  if(val === undefined) {
    val = new SortedSet();
    this.setKey(key, val, undefined, undefined, undefined, req);
  }
  return val.zincrby(increment, member);
}
559302
function hashSet(hash, key, value) {
        hash[key] = nativeCreate && value === undefined ? HASH_UNDEFINED : value;
      }
898769
function incrby(key, amount, req) {
  var val = utils.strtoint(this.getKey(key, req));
  amount = utils.strtoint(amount);
  val += amount;
  this.setKey(key, val, undefined, undefined, undefined, req);
  return val;
}