  We explain an algorithm to calculate Arthur's weighted orbital integral in
terms of the number of rational points on the fundamental domain of the
associated affine Springer fiber. The strategy is to count the number of
rational points of the truncated affine Springer fibers in two ways: by the
Arthur-Kottwitz reduction and by the Harder-Narasimhan reduction. A comparison
of results obtained from these two approaches gives us recurrence relations
between the number of rational points on the fundamental domains of the affine
Springer fibers and Arthur's weighted orbital integrals. As an example, we
calculate Arthur's weighted orbital integrals for the group $\mathrm{GL}_{2}$
and $\mathrm{GL}_{3}$.
