Sort given anonymous classes in order like java compiler would generate
output classes, in context of given anonymous type

@param anonymous
549385
private static void sortAnonymous(List<IType> anonymous, IType anonType) {
        SourceOffsetComparator sourceComparator = new SourceOffsetComparator();

        final AnonymClassComparator classComparator = new AnonymClassComparator(anonType, sourceComparator);
        Collections.sort(anonymous, classComparator);

//        if (Reporter.DEBUG) {
//            debugCompilePrio(classComparator);
//        }
    }
1347541
@Deprecated
    public static <T> void sort(T[] array, int size, Comparator<? super T> comparator)
    {
        if (comparator == null)
        {
            Arrays.sort(array, 0, size); // handles case size < 2 in Java 8 ComparableTimSort
        }
        else
        {
            Arrays.sort(array, 0, size, comparator); // handles case size < 2 in Java 8 TimSort
        }
    }
1272194
@Override
    public void sawOpcode(final int seen) {
        try {
            stack.precomputation(this);

            if (OpcodeUtils.isStandardInvoke(seen)) {
                String calledClass = getDottedClassConstantOperand();

                if (seen == Const.INVOKEINTERFACE) {
                    int parmCount = SignatureUtils.getNumParameters(this.getSigConstantOperand());
                    if (!countClassAccess(parmCount)) {
                        countClassAccess(calledClass);
                    }
                } else {
                    countClassAccess(calledClass);
                }
            } else if (seen == Const.PUTFIELD) {
                countClassAccess(1);
            } else if (seen == Const.GETFIELD) {
                countClassAccess(0);
            } else if ((seen == Const.PUTSTATIC) || (seen == Const.GETSTATIC)) {
                countClassAccess(getDottedClassConstantOperand());
            } else if ((seen == Const.ALOAD_0) && (!methodIsStatic)) {
                countClassAccess(clsName);
            }
        } finally {
            stack.sawOpcode(this, seen);
        }
    }
500307
public void organizeTypeAnnotationsSignatures(final Env<AttrContext> env, final JCClassDecl tree) {
        annotate.afterTypes(() -> {
            JavaFileObject oldSource = log.useSource(env.toplevel.sourcefile);
            try {
                new TypeAnnotationPositions(true).scan(tree);
            } finally {
                log.useSource(oldSource);
            }
        });
    }
699548
public static <T> void sort (T[] a, Comparator<? super T> comp)
    {
        sort(a, 0, a.length - 1, comp);
    }
57304
@SafeVarargs
    public static <V extends Comparable<V>> V[] sort(V... array) {
        Arrays.sort(array);
        return array;
    }
602392
public void sort(String func) {
        if (func == null || func.isEmpty()) {
            Object ary = invokeJavascript("sort");
        } else {
            Object ary = invokeJavascript("sort", func);
        }
    }
928787
function sortArgs(method, args) {

		// get the method definition
		var def = _.get(_client.types, method.replace(/\_Task$/i, '') + 'RequestType');
		
		// if found create the definition by calling its function
		if (def) {
			return getFields(def(), args);
		}
		return args;
	}
168128
def sort(self, callback=None):
        
        items = self.items

        if callback:
            return self.__class__(sorted(items, key=callback))
        else:
            return self.__class__(sorted(items))
410984
public static <T> void sort (List<T> a, Comparator<? super T> comp)
    {
        sort(a, 0, a.size() - 1, comp);
    }
12710
public void write(@WillClose OutputStream out) throws IOException {
        BufferedWriter writer = null;
        boolean missingClassWarningsSuppressed = AnalysisContext.currentAnalysisContext().setMissingClassWarningsSuppressed(true);

        try {
            writer = new BufferedWriter(new OutputStreamWriter(out, UTF8.charset));

            TreeSet<KeyType> sortedMethodSet = new TreeSet<>();
            sortedMethodSet.addAll(propertyMap.keySet());
            for (KeyType key : sortedMethodSet) {
                if (AnalysisContext.currentAnalysisContext().isApplicationClass(key.getClassDescriptor())) {

                    ValueType property = propertyMap.get(key);

                    writeKey(writer, key);
                    writer.write("|");
                    writer.write(encodeProperty(property));
                    writer.write("\n");
                }
            }
        } finally {
            AnalysisContext.currentAnalysisContext().setMissingClassWarningsSuppressed(missingClassWarningsSuppressed);

            try {
                if (writer != null) {
                    writer.close();
                }
            } catch (IOException e) {
                // Ignore
            }
        }
    }
576482
function sort(o) {
    if (self.getType(o) === 'object') {
      return Object.keys(o).sort().map(function(key) {
        return { k: key, v: sort(o[key]) };
      });
    } 
    return o;
  }
719032
public static void defineOrder(ProcessedInput processedInput, QueryParameters parameters) {
        String parameterName = null;

        for (int i = 0; i < processedInput.getAmountOfParameters(); i++) {
            parameterName = processedInput.getParameterName(i);

            if (parameterName != null) {
                parameters.updatePosition(parameterName, i);
            }
        }
    }
980671
@NonNull
    @Override
    public OrderBy orderBy(@NonNull Ordering... orderings) {
        if (orderings == null) {
            throw new IllegalArgumentException("orderings is null.");
        }
        return new OrderBy(this, Arrays.asList(orderings));
    }
458069
@Override
    void findReferencedClassNames(final Set<String> classNameListOut) {
        for (final TypeParameter typeParameter : typeParameters) {
            if (typeParameter != null) {
                typeParameter.findReferencedClassNames(classNameListOut);
            }
        }
        for (final TypeSignature typeSignature : parameterTypeSignatures) {
            if (typeSignature != null) {
                typeSignature.findReferencedClassNames(classNameListOut);
            }
        }
        resultType.findReferencedClassNames(classNameListOut);
        for (final ClassRefOrTypeVariableSignature typeSignature : throwsSignatures) {
            if (typeSignature != null) {
                typeSignature.findReferencedClassNames(classNameListOut);
            }
        }
    }
663989
private static int order(Method method) {
        final Order order = findFirst(method, Order.class).orElse(null);
        return order != null ? order.value() : 0;
    }
955482
private static List<ClasspathElement> orderClasspathElements(
            final Collection<Entry<Integer, ClasspathElement>> classpathEltsIndexed) {
        final List<Entry<Integer, ClasspathElement>> classpathEltsIndexedOrdered = new ArrayList<>(
                classpathEltsIndexed);
        CollectionUtils.sortIfNotEmpty(classpathEltsIndexedOrdered, INDEXED_CLASSPATH_ELEMENT_COMPARATOR);
        final List<ClasspathElement> classpathEltsOrdered = new ArrayList<>(classpathEltsIndexedOrdered.size());
        for (final Entry<Integer, ClasspathElement> ent : classpathEltsIndexedOrdered) {
            classpathEltsOrdered.add(ent.getValue());
        }
        return classpathEltsOrdered;
    }