Revert "SourceFormatter - refactor in order to fix bug while sorting javaterms"

This reverts commit dcc513c1aada1c22bfae79aab231ad1fae6ca819.
LPS-46582 Fix tests