the problem reduce_file_path, written in java