BANSKO-4 Rewrite merge.py to Java