Code generation is not completed

there are errors in code generation, outOfRange exeption rised when if
finded