public void sortAndSetFields() {
		for (GTreeNode node : getChildren()) {
			((FunctionBitPatternsGTreeNode) node).sortAndSetFields();
		}
		List<GTreeNode> children = new ArrayList<>(getChildren());
		Collections.sort(children);
		setChildren(children);
		//now set isLeaf
		if (getChildren().isEmpty()) {
			isLeaf = true;
		}
		//set percentage of paths that go through this node
		//(the node must already be part of a FunctionStarPatternsGTree for this to make sense)
		if (this.getTree() == null) {
			percentage = 0.0;
		}
		else {
			percentage =
				(100.0 * count) / ((FunctionBitPatternsGTree) this.getTree()).getTotalNum();
		}
	}
Sort the children of this node by the number of instruction sequences passing through each one
and set the percentage of all instruction sequences in the tree which pass through this node
Ghidra/Features/BytePatterns/src/main/java/ghidra/bitpatterns/info/FunctionBitPatternsGTreeNode.java