The classes are sorted for test purposes only. This gives us a predictable order for our
assertions on the generated code.

@param outline
489459
private Set<ClassOutline> sortClasses(Outline outline) {
        Set<ClassOutline> sorted = new TreeSet<>((aOne, aTwo) -> {
            String one = aOne.implClass.fullName();
            String two = aTwo.implClass.fullName();
            return one.compareTo(two);
        });
        sorted.addAll(outline.getClasses());
        return sorted;
    }
850177
public void setAssessmentRunArns(java.util.Collection<String> assessmentRunArns) {
        if (assessmentRunArns == null) {
            this.assessmentRunArns = null;
            return;
        }

        this.assessmentRunArns = new java.util.ArrayList<String>(assessmentRunArns);
    }
34535
private void processAttribute(CValuePropertyInfo property, ClassOutline clase, Outline model) {
		FieldOutline field = model.getField(property);
		String propertyName = property.getName(false);
		String className = clase.implClass.name();

		log("Attribute " + propertyName + " added to class " + className);
		XSComponent definition = property.getSchemaComponent();
		RestrictionSimpleTypeImpl particle = (RestrictionSimpleTypeImpl) definition;
		XSSimpleType type = particle.asSimpleType();
		JFieldVar var = clase.implClass.fields().get(propertyName);


//		if (particle.isRequired()) {
//			if (!hasAnnotation(var, NotNull.class)) {
//				if (notNullAnnotations) {
//					System.out.println("@NotNull: " + propertyName + " added to class " + className);
//					var.annotate(NotNull.class);
//				}
//			}
//		}

		validAnnotation(type, var, propertyName, className);
		processType(type, var, propertyName, className);
	}
290214
@Override
    public void visitClassContext(ClassContext classContext) {
        try {
            stack = new OpcodeStack();
            mapBugs = new ArrayList<>();
            setBugs = new ArrayList<>();
            hasMapComparator = false;
            hasSetComparator = false;
            super.visitClassContext(classContext);
            if (!hasMapComparator) {
                for (BugInstance bi : mapBugs) {
                    bugReporter.reportBug(bi);
                }
            }

            if (!hasSetComparator) {
                for (BugInstance bi : setBugs) {
                    bugReporter.reportBug(bi);
                }
            }
        } finally {
            stack = null;
            mapBugs = null;
            setBugs = null;
        }
    }
218377
private static void computeClassHierarchy(Class<?> clazz, List<Class<?>> classes) {
        for (Class<?> current = clazz; current != null; current = current.getSuperclass()) {
            if (classes.contains(current)) {
                return;
            }
            classes.add(current);
            for (Class<?> currentInterface : current.getInterfaces()) {
                computeClassHierarchy(currentInterface, classes);
            }
        }
    }
310299
public static void addDebugBorders (JPanel panel)
    {
        Color bcolor = new Color(_rando.nextInt(256), _rando.nextInt(256), _rando.nextInt(256));
        panel.setBorder(BorderFactory.createLineBorder(bcolor));

        for (int ii = 0; ii < panel.getComponentCount(); ii++) {
            Object child = panel.getComponent(ii);
            if (child instanceof JPanel) {
                addDebugBorders((JPanel)child);
            }
        }
    }
484971
public void order() {
        Collections.sort(cells, new Comparator<SortedSet<Integer>>() {

            @Override
            public int compare(SortedSet<Integer> cellA, SortedSet<Integer> cellB) {
                return cellA.first().compareTo(cellB.first());
            }

        });
    }
581003
@Override
    protected final List<Description> orderItems(Collection<Description> descriptions) {
        /*
         * In practice, we will never get here--Sorters do their work in the
         * compare() method--but the Liskov substitution principle demands that
         * we obey the general contract of Orderable. Luckily, it's trivial to
         * implement.
         */
        List<Description> sorted = new ArrayList<Description>(descriptions);
        Collections.sort(sorted, this); // Note: it would be incorrect to pass in "comparator"
        return sorted;
    }
1293650
void writeOutlines() throws IOException {
        if (rootOutline.getKids().size() == 0)
            return;
        outlineTree(rootOutline);
        writer.addToBody(rootOutline, rootOutline.indirectReference());
    }
19017
def _sync_outlineexplorer_file_order(self):
        
        if self.outlineexplorer is not None:
            self.outlineexplorer.treewidget.set_editor_ids_order(
                [finfo.editor.get_document_id() for finfo in self.data])
950742
@Override
	public void visitClassContext(ClassContext classContext) {
		try {
			stack = new OpcodeStack();
			localMethodCalls = new HashMap<>();
			fieldMethodCalls = new HashMap<>();
			staticMethodCalls = new HashMap<>();
			branchTargets = new BitSet();
			super.visitClassContext(classContext);
		} finally {
			stack = null;
			localMethodCalls = null;
			fieldMethodCalls = null;
			staticMethodCalls = null;
			branchTargets = null;
		}
	}
380762
def outline(self, value):
        
        if isinstance(value, SimpleLineSymbol):
            self._outline = value.asDictionary
754739
private void processNullLayouts(String className, String methodName) {
        if ("java/awt/Container".equals(className) && "setLayout".equals(methodName) && (stack.getStackDepth() > 0) && stack.getStackItem(0).isNull()) {
            bugReporter.reportBug(new BugInstance(this, BugType.S508C_NULL_LAYOUT.name(), NORMAL_PRIORITY).addClass(this).addMethod(this).addSourceLine(this));
        }
    }
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
            }
        }
    }
684484
public void sortPrefixes() {
        for (final Field field : ScanSpec.class.getDeclaredFields()) {
            if (WhiteBlackList.class.isAssignableFrom(field.getType())) {
                try {
                    ((WhiteBlackList) field.get(this)).sortPrefixes();
                } catch (final ReflectiveOperationException e) {
                    throw ClassGraphException.newClassGraphException("Field is not accessible: " + field, e);
                }
            }
        }
    }
565151
def outlineWidth(self, value):
        """"""
        if isinstance(value, (int, float, long)) and \
           not self._outline is None:
            self._outline['width'] = value
590049
private void checkTypeDepth(Feature feature, Class<?> current)
    {
        for (final Class<?> type : current.getInterfaces())
        {
            if (type.isAnnotationPresent(FeatureInterface.class))
            {
                final Feature old;
                // CHECKSTYLE IGNORE LINE: InnerAssignment
                if ((old = typeToFeature.put(type.asSubclass(Feature.class), feature)) != null)
                {
                    throw new LionEngineException(ERROR_FEATURE_EXISTS
                                                  + feature.getClass()
                                                  + AS
                                                  + type
                                                  + WITH
                                                  + old.getClass());
                }
                checkTypeDepth(feature, type);
            }
        }
        final Class<?> parent = current.getSuperclass();
        if (parent != null)
        {
            checkTypeDepth(feature, parent);
        }
    }