Static method code generation is wrong.