Software Engineering LLMs: Why We Need Them and How Software Engineering Helps Build Them
Organizations: Queen’s University, Canada · University of Manitoba, Canada · Center for Software Excellence, Huawei Technologies, Canada
Abstract
Software engineering (SE) expertise can shape how coding large language models (LLMs) are trained and which engineering capabilities they acquire. We examine this role through an industrial case study of capability-focused training for a 92B-parameter coding LLM serving more than 100,000 developers. We demonstrate how established SE knowledge can guide the selection of engineering capabilities, the construction of verifiable training data, and the evaluation of model improvements. To target repository-level refactoring, we developed RefactorForge, a pipeline that combines refactoring knowledge, established SE tools, and verification techniques to construct training data. Across 306 Python repositories, RefactorForge generated 5,704 executable tasks and retained 4,572 verified teacher trajectories totaling 72.51 million tokens. Incremental supervised fine-tuning on these trajectories, accounting for 0.46% of the preceding coding mixture's tokens, improved RefactorBench performance by 18.00 percentage points and SWE-Bench ProMax performance by 7.06 points. Under OpenCode, these improvements extended to SWE issue resolution, with gains of 4.97 points on SWE-Bench Verified and 1.23 points on SWE-Bench Pro. Improvements also persisted across other coding-agent harnesses, while greenfield repository generation showed mixed results. We report lessons from constructing capability-focused training data and evaluating its effects across engineering workloads. Building on this industrial experience, we propose a research agenda for expanding SE's role in transforming coding LLMs into SE LLMs: incorporating SE knowledge into model training, applying engineering methods to model development and maintenance, and systematically defining the engineering capabilities these models should acquire.
Figures & tables
| Code Health | Iterations | Cost | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Project | LOC | Size | Initial | Final | (%) | Acc. | Rej. | Tokens (M) | USD | Time (h:min) | Status |
| Arktype | 32,617 | Large | 8.89 | 8.99 | 1.12 | 19 | 3 | 383.58 | 268.44 | 19:31 | Budget exhausted |
| Participle | 7,859 | Medium | 8.04 | 8.46 | 5.22 | 24 | 3 | 668.07 | 454.24 | 28:29 | Budget exhausted |
| ABS | 6,596 | Medium | 6.93 | 7.43 | 7.22 | 20 | 2 | 591.20 | 425.81 | 28:43 | Budget exhausted |
| Dateutil | 5,725 | Medium | 3.88 | 5.64 | 45.36 | 20 | 7 | 263.07 | 165.29 | 10:09 | Finished |
| Aiomonitor | 2,653 | Small | 8.19 | 8.67 | 5.86 | 10 | 0 | 274.72 | 186.22 | 12:01 | Finished |
| Refactoring type | Candidate code | Properties checked by generated F2P tests | Tasks (share) |
|---|---|---|---|
| Rename Function | Top-level functions. | New name present in the defining module and old name absent. Where affected by the reference change, identifier uses, import bindings, and all exports also reflect the rename. | 1,899 (33.29%) |
| Rename Class | Top-level classes. | 2,671 (46.83%) | |
| Rename Constant | Module-level constants. | 567 (9.94%) | |
| Rename Attribute | Class and instance attributes. | New name replaces the old name in the owning class. Affected attribute references reflect the rename. | 362 (6.35%) |
| Remove Unused Function | Private top-level functions with no resolved references. | Target function absent. Remaining top-level definition names match the reference outcome. | 25 (0.44%) |
| Remove Unused Import | Names flagged as unused in from ... import ... statements. | Target import bindings absent. Retained bindings and top-level definition names remain. | 46 (0.81%) |
| Refactoring (C1) | SWE issue resolution (C2) | |||
|---|---|---|---|---|
| SWE-Bench ProMax | RefactorBench (Lazy) | SWE-Bench Verified | SWE-Bench Pro | |
| Baseline-92B | 51.18 | 43.00 | 62.00 | 48.97 |
| Refact-92B | 58.24 | 61.00 | 66.97 | 50.20 |
| Improvement (pp) | +7.06 | +18.00 ∗ | +4.97 | +1.23 |
Code Language Models
Code language models are AI models that generate, explain, edit, and reason about source code across programming tasks.
See all 115 papers