porting code from an existing repository: Python --> Java