Can anyone help to explain part of code in elasticsearch

2 method in BalancedShardsAllocator.Balancer
buildModelFromAssigned
allocateUnassigned

the code is complicated.

Can you provide a link to it?

https://github.com/elastic/elasticsearch/blob/master/core/src/main/java/org/elasticsearch/cluster/routing/allocation/allocator/BalancedShardsAllocator.java

private void buildModelFromAssigned()
private boolean allocateUnassigned()