public boolean retainAll(Collection<?> mocks) { return backingHashSet.retainAll(asWrappedMocks(mocks)); }
public boolean retainAll(Collection<?> mocks) { return backingHashSet.retainAll(asWrappedMocks(mocks)); }
/** * @ast method * @aspect GenericMethodsInference * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/GenericMethodsInference.jrag:668 */ public static HashSet EC(ArrayList list) { HashSet result = new HashSet(); boolean first = true; for(Iterator iter = list.iterator(); iter.hasNext(); ) { TypeDecl U = (TypeDecl)iter.next(); // erased supertype set of U HashSet EST = LUBType.EST(U); if(first) { result.addAll(EST); first = false; } else result.retainAll(EST); } return result; } /**
intersection.retainAll(previous.apps.keySet());
private void splitJsrExceptionRanges(Set<BasicBlock> common_blocks, Map<Integer, BasicBlock> mapNewNodes) { for (int i = exceptions.size() - 1; i >= 0; i--) { ExceptionRangeCFG range = exceptions.get(i); List<BasicBlock> lstRange = range.getProtectedRange(); HashSet<BasicBlock> setBoth = new HashSet<>(common_blocks); setBoth.retainAll(lstRange); if (setBoth.size() > 0) { List<BasicBlock> lstNewRange; if (setBoth.size() == lstRange.size()) { lstNewRange = new ArrayList<>(); ExceptionRangeCFG newRange = new ExceptionRangeCFG(lstNewRange, mapNewNodes.get(range.getHandler().id), range.getExceptionTypes()); exceptions.add(newRange); } else { lstNewRange = lstRange; } for (BasicBlock block : setBoth) { lstNewRange.add(mapNewNodes.get(block.id)); } } } }
/** * Do any prep work needed to perform bug filtering * * @param origCollection */ public void getReady(SortedBugCollection origCollection) { if (maybeMutatedAsString != null) { HashSet<String> addedIssues = new HashSet<>(); HashSet<String> removedIssues = new HashSet<>(); for (BugInstance b : origCollection) { if (b.getFirstVersion() == maybeMutated) { addedIssues.add(getBugLocation(b)); } else if (b.getLastVersion() == maybeMutated - 1) { removedIssues.add(getBugLocation(b)); } } addedIssues.remove(null); addedIssues.retainAll(removedIssues); mutationPoints = addedIssues; } }
for (Proposal.QuorumVerifierAcksetPair qvAckset: p.qvAcksetPairs){ candidates.retainAll(qvAckset.getAckset());
both.retainAll(oEdges.get(e)); for (E e2 : both) { iEdges.remove(e, e2);
testLocales.retainAll(Arrays.asList(NumberFormat.getAvailableLocales())); testLocales.add(null);
recipients.retainAll(this.dm.getDistributionManagerIds()); if (!recipients.isEmpty()) { if (this.txState.internalDuringIndividualSend != null) {
private void pruneConflictingValues(TypeQualifierValueSet fact, TypeQualifierValueSet forwardFact) { if (forwardFact.isValid()) { HashSet<ValueNumber> valueNumbers = new HashSet<>(); valueNumbers.addAll(fact.getValueNumbers()); valueNumbers.retainAll(forwardFact.getValueNumbers()); for (ValueNumber vn : valueNumbers) { if (FlowValue.valuesConflict(typeQualifierValue.isStrictQualifier() && !xmethod.isIdentity(), forwardFact.getValue(vn), fact.getValue(vn))) { fact.pruneValue(vn); } } } }
clusteredResourceTypes.retainAll(CLUSTER_RESOURCES);
setCommonExceptionHandlers.retainAll(pred.getSuccExceptions());
setPredHandlersIntersection.retainAll(pred.getSuccExceptions());
GraphDumper(DAGNode<Component, Dependency> g, Set<DAGNode<Component, Dependency>> unshared, GraphWriter gw) { writer = gw; graph = g; unsharedNodes = Sets.newHashSet(unshared); unsharedNodes.retainAll(g.getReachableNodes()); logger.debug("{} shared nodes", unsharedNodes.size()); nodeIds = new HashMap<>(); nodeTargets = new HashMap<>(); edgeQueue = new LinkedList<>(); }
candidateSet = thisWordChoices; } else { candidateSet.retainAll(thisWordChoices);
/** * Validates only 1 vertex is tangential (shared) between the interior and exterior of a polygon */ protected void validateHole(LineStringBuilder shell, LineStringBuilder hole) { HashSet<Coordinate> exterior = Sets.newHashSet(shell.coordinates); HashSet<Coordinate> interior = Sets.newHashSet(hole.coordinates); exterior.retainAll(interior); if (exterior.size() >= 2) { throw new InvalidShapeException("Invalid polygon, interior cannot share more than one point with the exterior"); } }
/** * Looks up the set of documents containing each word. Returns the intersection of these. */ public ImmutableSet<String> lookup(Iterable<String> words) { HashSet<String> documents = null; try (Jedis jedis = pool.getResource()) { jedis.select(TOKEN_DB); for (String word : words) { word = stemmer.stem(word.toLowerCase()).toString(); if (documents == null) { documents = new HashSet(); documents.addAll(jedis.smembers(word)); } else { documents.retainAll(jedis.smembers(word)); } } } if (documents == null) { return ImmutableSet.<String>of(); } return ImmutableSet.<String>copyOf(documents); }
if (!Collections.disjoint(columnFamilies, previousColumnFamilies)) { HashSet<ByteSequence> overlap = new HashSet<>(columnFamilies); overlap.retainAll(previousColumnFamilies); throw new IllegalArgumentException( "Column families over lap with previous locality group : " + overlap);
testLocales.retainAll(Arrays.asList(NumberFormat.getAvailableLocales())); testLocales.add(null);