private GroovyResolveResult[] filterCandidates() {
    List<GroovyMethodResult> array = getCandidatesInternal();
    if (array.size() == 1) return array.toArray(GroovyResolveResult.EMPTY_ARRAY);

    List<GroovyMethodResult> result = new ArrayList<>();

    Iterator<GroovyMethodResult> itr = array.iterator();

    result.add(itr.next());

    Outer:
    while (itr.hasNext()) {
      GroovyMethodResult resolveResult = itr.next();
      for (Iterator<GroovyMethodResult> iterator = result.iterator(); iterator.hasNext(); ) {
        final GroovyMethodResult otherResolveResult = iterator.next();
        int res = GrMethodComparator.compareMethods(resolveResult, otherResolveResult, this);
        if (res > 0) {
          continue Outer;
        }
        else if (res < 0) {
          iterator.remove();
        }
      }

      result.add(resolveResult);
    }

    return result.toArray(GroovyResolveResult.EMPTY_ARRAY);
  }
private GroovyResolveResult[] filterCandidates()