Evaluating the Generalizability of LLMs in Automated Program Repair