Segment tree java code Explanation

Can anyone explain this segment tree code by andrey naumenko??
please try to explain each and every line