compiler: java: replace methods