Rethinking Repetition Problems of LLMs in Code Generation