Universal method for replacing separators.

Minor: refactoring
Object declaration requires tabulation.

Minor: java code conventions, refactoring

 #KT-5658 Fixed
Autoindention after inserting closing brace improved.

 #KT-5657 Fixed
Closing brace tests added and several tests changed.

Minor: refactoring