HAFixAgent: History-Aware Automated Program Repair Agent