Returns a list of lists. Each list represents tiers of candidates. candidates in earlier
        tiers are preferred to candidates appearing in later tiers. Candidates in the same tier
        are preferred equally.
188264
def getOrderVector(self):
        

        # We sort the candidates based on the number of incoming edges they have in the graph. If 
        # two candidates have the same number, we assume that they are tied.
        incEdgesMap = self.getIncEdgesMap()
        sortedKeys = sorted(incEdgesMap.keys(), reverse = True)
        orderVector = []
        print(sortedKeys)
        # print("sortedKeys",sortedKeys)
        # print("incEdgesMap", incEdgesMap)
        for key in sortedKeys:
            tier = []
            cands = incEdgesMap[key]
            # print("qq",cands)
            for cand in cands:
                tier.append(cand)
                # print("cand=",cand)
            # print("tier", tier)
            orderVector.append(tier[0])  # replace tier with tier[0]
        return orderVector
605739
def get_sorted_proposal_list(self):
        """"""
        proposals = {}
        for proposal in self.proposals:
            proposals.setdefault(proposal.scope, []).append(proposal)
        result = []
        for scope in self.scopepref:
            scope_proposals = proposals.get(scope, [])
            scope_proposals = [proposal for proposal in scope_proposals
                               if proposal.type in self.typerank]
            scope_proposals.sort(key=self._proposal_key)
            result.extend(scope_proposals)
        return result
432583
public List<T> pollAll() {
    List<T> retList = new ArrayList<T>(size);
    for (int i = 0; i < entries.length; i++) {
      LinkedElement<T> current = entries[i];
      while (current != null) {
        retList.add(current.element);
        current = current.next;
      }
    }
    this.clear();
    return retList;
  }
68547
public List<SimpleOrderedMap<Object>> list() {
    List<SimpleOrderedMap<Object>> list = new ArrayList<>();
    for (Entry<String, String> entry : idToVersion.entrySet()) {
      SimpleOrderedMap<Object> item = new SimpleOrderedMap<>();
      item.add("id", entry.getKey());
      item.add("size", versionToItem.get(entry.getValue()).size);
      item.add("version", entry.getValue());
      item.add("expiration", expirationVersion.get(entry.getValue()));
      list.add(item);
    }
    return list;
  }
982521
public List<T> getChildChoices()
	{
		final List<T> childChoices = getModelsMap().get(getSelectedRootOption());
		if (CollectionExtensions.isEmpty(childChoices))
		{
			return Collections.emptyList();
		}
		return childChoices;
	}
546962
private int collectCandidates(Map<Long, Score> candidates,
                                List<Bucket> buckets,
                                int threshold) {
    int ix;
    for (ix = 0; ix < threshold &&
           candidates.size() < (CUTOFF_FACTOR_1 * max_search_hits); ix++) {
      Bucket b = buckets.get(ix);
      long[] ids = b.records;
      double score = b.getScore();
      
      for (int ix2 = 0; ix2 < b.nextfree; ix2++) {
        Score s = candidates.get(ids[ix2]);
        if (s == null) {
          s = new Score(ids[ix2]);
          candidates.put(ids[ix2], s);
        }
        s.score += score;
      }
      if (DEBUG)
        System.out.println("Bucket " + b.nextfree + " -> " + candidates.size());
    }
    return ix;
  }
394936
def getOrderVectors(self):
        

        orderVectors = []
        for preference in self.preferences:
            orderVectors.append(preference.getOrderVector())
        return orderVectors
802133
def _container_candidates(self):
        
        if not self._rectangles:
            return []

        if self._rotation:
            sides = sorted(side for rect in self._rectangles for side in rect)
            max_height = sum(max(r[0], r[1]) for r in self._rectangles)
            min_width = max(min(r[0], r[1]) for r in self._rectangles)
            max_width = max_height
        else:
            sides = sorted(r[0] for r in self._rectangles)
            max_height = sum(r[1] for r in self._rectangles)
            min_width = max(r[0] for r in self._rectangles)
            max_width = sum(sides)
        
        if self._max_width and self._max_width < max_width:
            max_width = self._max_width

        if self._max_height and self._max_height < max_height:
            max_height = self._max_height

        assert(max_width>min_width)
 
        # Generate initial container widths
        candidates = [max_width, min_width]

        width = 0
        for s in reversed(sides):
            width += s
            candidates.append(width)
        
        width = 0
        for s in sides:
            width += s
            candidates.append(width)

        candidates.append(max_width)
        candidates.append(min_width)
      
        # Remove duplicates and widths too big or small
        seen = set()
        seen_add = seen.add
        candidates = [x for x in candidates if not(x in seen or seen_add(x))] 
        candidates = [x for x in candidates if not(x>max_width or x<min_width)]
        
        # Remove candidates too small to fit all the rectangles
        min_area = sum(r[0]*r[1] for r in self._rectangles)
        return [(c, max_height) for c in candidates if c*max_height>=min_area]
1279032
public List<Integer> listValues() {
		ArrayList<Integer> list = new ArrayList<Integer>(getRange());
		for (int i = getMin(); i <= getMax(); i++) {
			list.add(i);
		}
		return list;
	}
17521
public Iterable<ESigItemIssue> getIssues() {
        if (sortIssues) {
            sortIssues = false;
            Collections.sort(issues);
        }
        
        return issues;
    }
1013703
def get_option_lists(self):
        
        return [self.get_option_list()] + \
            [option_list
                for name, description, option_list
                in self.get_option_groups()]
227997
def as_sorted_list(options):
        
        if len(options) > 0:
            options = sorted(options, key=lambda o: o.number)
        return options
325253
public List<E> toList()
    {
        ArrayList<E> list = new ArrayList<E>(queue.size());
        while (!queue.isEmpty())
        {
            list.add(0, queue.poll());
        }

        return list;
    }
733595
def get_proficiencies(self):
        
        if self.retrieved:
            raise errors.IllegalState('List has already been retrieved.')
        self.retrieved = True
        return objects.ProficiencyList(self._results, runtime=self._runtime)
15283
private void sortList(ArrayList candidateList) {
    java.util.Collections.sort(candidateList, new java.util.Comparator() {
      public int compare(Object o1, Object o2) {
        double scoreT = ( (TagLink.Candidates) o1).getScore();
        double scoreU = ( (TagLink.Candidates) o2).getScore();
        if(scoreU > scoreT){
			return 1;
		}
        if(scoreU > scoreT){
			return -1;
		}
		return 0;
      }
    }
    );
  }
1350758
private ImmutableList<ContentResult> filterPotentialMatches(List<ContentResult> candidates) {
    // Sort candidates such that those with the longest formatted strings come first.
    Collections.sort(candidates, new Comparator<ContentResult>() {
      @Override
      public int compare(ContentResult o1, ContentResult o2) {
        String o1Formatted = o1.getL10nFormatted();
        String o2Formatted = o2.getL10nFormatted();
        int o1Length = o1Formatted.length();
        int o2Length = o2Formatted.length();
        // Sort longest to shortest, then lexicographically.
        if (o1Length > o2Length) {
          return -1;
        } else if (o1Length == o2Length) {
          return o1Formatted.compareTo(o2Formatted);
        } else {
          return 1;
        }
      }
    });
    // Build the final result by filtering out ContentResult instances that with formatted strings that are contained by
    // the already selected instances' formatted strings.
    List<ContentResult> res = new ArrayList<>();
    for (ContentResult candidate : candidates) {
      boolean contained = false;
      for (ContentResult member : res) {
        if (member.getL10nFormatted().contains(candidate.getL10nFormatted())) {
          contained = true;
          break;
        }
      }
      if (!contained) {
        res.add(candidate);
      }
    }
    return ImmutableList.copyOf(res);
  }
1021141
def selected(self, ids):
        
        result = copy(self.choices)
        result = filter(lambda x: x[0] in ids, result)
        # result = ((item, item) for item in result)
        return list(result)