Demystifying Memorization in LLM-based Program Repair via a General Hypothesis Testing Framework