Subset generation method
@return
972363
@Override
  public List<List<DoubleSolution>> subsetGeneration() {
    List<List<DoubleSolution>> solutionGroupsList ;

    solutionGroupsList = generatePairsFromSolutionList(referenceSet1) ;

    solutionGroupsList.addAll(generatePairsFromSolutionList(referenceSet2));

    return solutionGroupsList ;
  }
308368
@Override
	public Collection<BioPAXElement> generate(Match match, int... ind)
	{
		Collection<BioPAXElement> gen = new HashSet<BioPAXElement> (
			con[0].generate(match, ind));

		for (int i = 1; i < con.length; i++)
		{
			if (gen.isEmpty()) break;

			gen.retainAll(con[i].generate(match, ind));
		}
		return gen;
	}
1099611
public List<List<Classification.RuntimeClassification>> generate() {
    List<Classification.RuntimeClassification> classes = getClassifications();
    List<List<Classification.RuntimeClassification>> treeData = new ArrayList<>();
    for (Classification.RuntimeClassification cls : classes) {
      treeData.add(cls.getClassifications());
    }

    combinations = new ArrayList<>();
    getCombinations(treeData, 0, new ArrayList<>());
    return combinations;
  }
757348
public Criteria subsetof(Collection<?> c) {
        notNull(c, "collection can not be null");
        this.criteriaType = RelationalOperator.SUBSETOF;
        this.right = new ValueListNode(c);
        return this;
    }
1373000
public java.util.List<SecurityGroupReference> getSecurityGroupReferenceSet() {
        if (securityGroupReferenceSet == null) {
            securityGroupReferenceSet = new com.amazonaws.internal.SdkInternalList<SecurityGroupReference>();
        }
        return securityGroupReferenceSet;
    }
727306
public static <T> Set<T> enumerationToSet(Enumeration<T> enumeration) {
        Set<T> set = new HashSet<>();
        while (enumeration.hasMoreElements()) {
            set.add(enumeration.nextElement());
        }
        return set;
    }
703834
def subsets(nums):
    
    n = len(nums)
    total = 1 << n
    res = set()

    for i in range(total):
        subset = tuple(num for j, num in enumerate(nums) if i & 1 << j)
        res.add(subset)

    return res
886981
public java.util.Iterator iterator() {
        // TODO Bug in remove from a concurrentSet/Map iterator, it does not actually do the remove!
        java.util.Set combinedSet = new java.util.HashSet();
        if (subSets != null) {
            for (int i = 0; i < subSets.length; i++) {
                synchronized (subSets[i]) {
                    combinedSet.addAll(subSets[i]);
                } // synchronized (subSet).
            }
        }
        return combinedSet.iterator();
    }
369390
@Override
    public Set<K> keySet() {
        try {
            lockAllSegments();
            Set<K> set = new HashSet<>();
            for (LinkedHashMapSegment<K, V> seg : segments) {
                set.addAll(seg.keySet());
            }
            return set;
        } finally {
            unlockAllSegments();
        }
    }
203167
public static <T> Set<T> subSet(Set<T> original, int from, int to) {
        List<T> list = new ArrayList<>(original);
        if (to == -1) {
            to = original.size();
        }
        return new LinkedHashSet<>(list.subList(from, to));
    }
485333
public ArrayList<String> getGenerators() {
        ArrayList<String> genList = new ArrayList<String>();
        for (ArrayList<HashMap<String, String>> genGroup : genGroups) {
            if (!genGroup.isEmpty()) {
                HashMap<String, String> genRule = genGroup.get(genGroup.size() - 1);
                if (!genRule.isEmpty()) {
                    genList.add(genRule.get("cmd") + "," + genRule.get("variable") + "," + genRule.get("args"));
                }
            }
        }

        return genList;
    }
70052
public IndexedSet<T> universe() {
		IntSet allItems = indices.empty();
		allItems.fill(0, indexToItem.length - 1);
		return createFromIndices(allItems);
	}
754171
public Set<String> keySet() {
		// prepare container
		HashSet<String> set = new HashSet<String>();
		// add container keys
		set.addAll(container.keySet());
		// add cache keys
		set.addAll(cache.keySet());
		
		return set;
	}
998254
public static <T> Stream<Set<T>> combinationsStream(Set<T> elements, int subsetSize) {
        if (subsetSize == 0) {
            return Stream.of(new HashSet<>());
        }
        else if (subsetSize <= elements.size()) {
            Set<T> remainingElements = elements;

            Iterator<T> it = remainingElements.iterator();
            T X = it.next();
            it.remove();

            Stream<Set<T>> combinations = Stream.concat(
                    combinationsStream(remainingElements, subsetSize), //exclude X
                    combinationsStream(remainingElements, subsetSize-1).map(s -> {s.add(X); return s;}) //include X
            );

            remainingElements.add(X);

            return combinations;
        }
        else {
            return Stream.empty();
        }
    }
18274
private static int[] subset(final int[] electrons) {
        int[] vs = new int[electrons.length];
        int n = 0;

        for (int i = 0; i < electrons.length; i++)
            if (electrons[i] >= 0) vs[n++] = i;

        return Arrays.copyOf(vs, n);
    }
1170174
def _subset(subset, superset):
    

    result = True
    for k in subset:
        result = k in superset and subset[k] == superset[k]
        if not result:
            break
    return result
1037648
public final int size() {
        int overallSize = 0;
        if (subSets != null) {
            for (int i = 0; i < subSets.length; i++) {
                overallSize = overallSize + subSets[i].size();
            }
        }
        return overallSize;
    }