Clears a match from matchesLookup for dependencies
175305
function(matchIndex) {
		var oldToken = this.matchesLookup[matchIndex].token;
		for (var j=0;j<this.matchesLookup.length;++j) {
			this.matchesLookup[j].usedBy = this.matchesLookup[j].usedBy.split(oldToken).join("");
		}
		this.matchesLookup[matchIndex].cleared=true;
	}
731689
def filter(self, info, releases):
        
        for version in list(releases.keys()):
            if any(pattern.match(version) for pattern in self.patterns):
                del releases[version]
159324
def get_matches(self, text, cache=None, conflict_resolver=resolve_using_maximal_coverage):
        """"""
        is_root_node = False
        if cache is None:
            cache = {}
            is_root_node = True
        if id(self) in cache:
            return cache[id(self)]
        matches = self.get_matches_without_cache(text, cache=cache)
        cache[id(self)] = matches

        # if this is the root node, resolve the matches
        if is_root_node and conflict_resolver is not None:
            return conflict_resolver(matches)
        return matches
106544
def _clean_bindings(self, bindings):
        
        return list(filter(lambda b: not isinstance(b, QueryExpression), bindings))
1055264
def remove_dependency(self, p_from_todo, p_to_todo, p_leave_tags=False):
        
        dep_id = p_from_todo.tag_value('id')

        if dep_id:
            self._depgraph.remove_edge(hash(p_from_todo), hash(p_to_todo))
            self.dirty = True

        # clean dangling dependency tags
        if dep_id and not p_leave_tags:
            p_to_todo.remove_tag('p', dep_id)

            if not self.children(p_from_todo, True):
                p_from_todo.remove_tag('id')
                del self._parentdict[dep_id]
181933
protected void clearDependencyCaches(String url) {
        // Create the Clear Cache URL for the Alfresco Tomcat server
        URL alfrescoTomcatUrl = buildFinalUrl(url);
        if (alfrescoTomcatUrl == null) {
            getLog().error("Could not build clear dependency caches URL for " +
                    refreshWebappName + ", " + getAbortedMsg());
        }

        // Do the refresh
        makePostCall(alfrescoTomcatUrl, null, "Clear Dependency Caches");
    }
151472
def match_local(self, prefix, includes, excludes):
        
        includes_pattern = r"|".join([fnmatch.translate(x) for x in includes])
        excludes_pattern = r"|".join([fnmatch.translate(x) for x in excludes]) or r"$."
        matches = []
        for root, dirs, files in os.walk(prefix, topdown=True):
            # exclude dirs
            dirs[:] = [os.path.join(root, d) for d in dirs]
            dirs[:] = [d for d in dirs if not re.match(excludes_pattern,
                                                       d.split(root)[1])]
            # exclude/include files
            files = [os.path.join(root, f) for f in files]
            files = [os.path.join(root, f) for f in files
                     if not re.match(excludes_pattern, f)]
            files = [os.path.join(root, f) for f in files
                     if re.match(includes_pattern, f.split(prefix)[1])]
            for fname in files:
                matches.append(fname)
        return matches
976341
function match (filename, patterns, ignorePatterns) {
  function isMatch (ps) {
    return ps.some(p => {
      return mm.isMatch(filename, p, mmOptions)
    })
  }

  let isIgnore = false

  if (Array.isArray(ignorePatterns) && ignorePatterns.length) {
    isIgnore = isMatch(ignorePatterns)
  }

  if (isIgnore) {
    return false
  }

  return isMatch(patterns)
}
218883
def clean(self, config=True, catalog=False, check=False):
        

        try:
            if (config):
                os.unlink(self.config['FILTER_NAME'])
                os.unlink(self.config['PARAMETERS_NAME'])
                os.unlink(self.config['STARNNW_NAME'])
                os.unlink(self.config['CONFIG_FILE'])
            if (catalog):
                os.unlink(self.config['CATALOG_NAME'])
            if (check):
                os.unlink(self.config['CHECKIMAGE_NAME'])

        except OSError:
            pass
458971
private boolean matchAtoms(Match match) {
        IAtom atom = match.getTargetAtom();
        if (match.getQueryNode().countNeighbors() > target.countNeighbors(atom)) {
            return false;
        }
        return match.getQueryNode().getAtomMatcher().matches(target, atom);
    }
77721
protected void resetMatchIndex(RaftMemberContext member, AppendResponse response) {
    if (response.lastLogIndex() < member.getMatchIndex()) {
      member.setMatchIndex(response.lastLogIndex());
      log.trace("Reset match index for {} to {}", member, member.getMatchIndex());
    }
  }
993288
def clean(docs=False, bytecode=False, extra=''):
    ''''''
    patterns = ['build', 'dist', 'cover', 'docs/_build', '**/*.pyc', '*.egg-info', '.tox', '**/__pycache__']
    for pattern in patterns:
        print('Removing {0}'.format(pattern))
        lrun('rm -rf {0}'.format(pattern))
587543
function lookupSpecMatch(lookup, spec) {
  // Direct match
  if (lookup[spec]) {
    return lookup[spec];
  }

  // Close match
  var shortSpec = spec.replace(/@\D/g,'@');
  if (lookup[shortSpec]) {
    return lookup[shortSpec];
  }

  // Check for Semver valid match
  var lastIndex = spec.lastIndexOf('@');
  var myName = spec.substring(0, lastIndex);
  var myVersion = spec.substring(lastIndex + 1);
  for(var k in lookup) {
    lastIndex = k.lastIndexOf('@');
    var yourName = k.substring(0, lastIndex);
    var yourVersion = k.substring(lastIndex + 1);
    if (myName == yourName && semver.valid(yourVersion) && semver.satisfies(yourVersion, myVersion)) {
      return lookup[k];
    }
  }
  return undefined;
}
345027
function trimNested(previous, current, opts) {
    // bail early if we want to keep nested dependencies
    if (opts.keepNested) {
        return current;
    }

    // purposes find patches from to
    // apply TO current FROM previous
    var patches = jsonDiff.diff(current, previous);

    if (!patches) {
        return current;
    }

    patches = removeTopLevelPatches(patches);

    if (patches.dependencies) {
        Object.keys(patches.dependencies)
            .forEach(function (key) {
                current.dependencies[key] =
                    previous.dependencies[key];
            });
    }

    return current;
}
1362387
public static Set<String> retainMatchingKeys(Counter<String> counter, List<Pattern> matchPatterns) {
    Set<String> removed = new HashSet<String>();
    for (String key : counter.keySet()) {
      boolean matched = false;
      for (Pattern pattern : matchPatterns) {
        if (pattern.matcher(key).matches()) {
          matched = true;
          break;
        }
      }
      if (!matched) {
        removed.add(key);
      }
    }
    for (String key : removed) {
      counter.remove(key);
    }
    return removed;
  }
471846
def clear(self, train=False, split=0):
        
        # Clear Features for the candidates in the split passed in.
        logger.info(f"Clearing Features (split {split})")

        sub_query = (
            self.session.query(Candidate.id).filter(Candidate.split == split).subquery()
        )
        query = self.session.query(Feature).filter(Feature.candidate_id.in_(sub_query))
        query.delete(synchronize_session="fetch")

        # Delete all old annotation keys
        if train:
            logger.debug(f"Clearing all FeatureKeys from {self.candidate_classes}...")
            drop_all_keys(self.session, FeatureKey, self.candidate_classes)
770628
public static void clearAssumptions(Map<Integer, Integer> assumptionTill, int pc) {
        Iterator<Integer> it = assumptionTill.values().iterator();
        while (it.hasNext()) {
            if (it.next().intValue() <= pc) {
                it.remove();
            }
        }
    }