converted MergeMappingTask to java