Siwei Xu
Author directory2026
Synthesizing Code Completion Trajectories for Mid-training in Software Engineering
Siwei Xu | Qiyuan Liu | Ruifan Li
Findings of the Association for Computational Linguistics: IJCNLP-AACL 2026
Siwei Xu | Qiyuan Liu | Ruifan Li
Findings of the Association for Computational Linguistics: IJCNLP-AACL 2026
Large language models (LLMs) have shown remarkable capabilities in interactive real-world software engineering (SWE) scenarios. However, the execution-aware training data are hard to scale and are mostly used for post-training, leaving agentic mid-training underexplored. To this end, we propose COMP-SYNTH, a novel automated pipeline for synthesizing reflective code completion trajectories. Specifically, based on executable repository environments, COMP-SYNTH identifies test-covered target functions, masks their implementations, and prompts an LLM to complete them under execution feedback. Then, each generated completion is verified by running the associated tests. Furthermore, failed attempts are augmented with diagnostic signals to extract useful supervision. Thus, we construct COMP-TRAJ, a mid-training dataset that exposes models to repository context, execution feedback, and iterative code revision. Extensive experiments on repository-level SWE benchmarks show that mid-training on COMP-TRAJ effectively enhances capabilities in SWE. Our code and data are publicly available at https://github.com/uuam5/comp-traj.