delete unused code in codegen for method