Manuscript Offprint

arXiv:2610.33851

Software Engineering LLMs: Why We Need Them and How Software Engineering Helps Build Them

Amir M. Ebrahimi, Mohammed Mehedi Hasan, Seyed Shayan Daneshvar, Jiahuei Lin, Gopi Krishnan Rajbahadur, Ahmed E. Hassan

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Amir M. Ebrahimi*, Mohammed Mehedi Hasan*, Seyed Shayan Daneshvar†, Jiahuei Lin†, Gopi Krishnan Rajbahadur*, Ahmed E. Hassan*

*Queen's University, Canada; †University of Manitoba, Canada

†Center for Software Excellence, Huawei Technologies, Canada

amir.ebrahimi@queensu.ca mohammedmehedi.hasan@queensu.ca daneshvs@myumanitoba.ca

jhlin@cs.queensu.ca grajbahadur@acm.org ahmed@cs.queensu.ca

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.

Index Terms—Software engineering for AI (SE4AI), large language models (LLMs), coding agents, software refactoring, supervised fine-tuning, synthetic data, software maintenance.

I. INTRODUCTION

Large language models (LLMs) and coding agents are reshaping software development in industry and open source. Google reports that AI generates 75% of its new code [1], while Robbes et al. [2] estimate coding-agent adoption at 22 to 29% across 128,018 GitHub projects. Frontier coding LLMs now score above 96% on SWE-Bench Verified: Claude Opus 5, DeepSeek V4 Pro, and GPT-5.6 Sol reach 97.0%, 96.4%, and 96.2%, respectively, under the same minimal agent harness [3].

Strong coding performance, however, does not guarantee the engineering capabilities required to maintain and evolve software. Whitfill et al. [4] found that automated benchmark

Figure

Fig. 1. Operation-level success rates of GPT-5.2 and GLM-5.1 across 13 RefactorBench categories. Aggregate success rates of 62% and 51% conceal substantial differences across individual operations.

scores exceeded estimated maintainer acceptance rates by 24.2 percentage points, but code quality and compatibility were reported concerns. Open-source evidence reveals problems after merge: across 182 repositories, Xia and Miller [5] found higher corrective-maintenance rates for agentic code and associated higher rates of unreviewed merges with greater maintenance burden. Software engineering requires more than completing difficult programming tasks. Engineers must preserve compatibility, manage dependencies, remove unnecessary code, and maintain systems as requirements evolve. Refactoring is one such software engineering capability that goes beyond code generation. Refactoring supports long-term maintainability by improving software structure while preserving behavior [6], [7]. Although developers increasingly delegate refactoring to coding agents, which pair coding LLMs with harnesses that supply tools and prompts [8], frontier coding LLMs perform unevenly across these operations. To examine this gap, we evaluated GPT-5.2 and GLM-5.1 on RefactorBench, which contains repository-level, multi-file refactoring tasks across 13 operation categories (see Section IV for the evaluation setup).

The models achieved overall success rates of 62% (GPT-5.2) and 51% (GLM-5.1), but both failed every Extract Class task. GPT-5.2 also failed every Move Class and Introduce Parameter Object (Figure 1). These results reveal that even highly capable coding LLMs struggle with established software engineering operations.

What coding LLMs learn depends on the training data developers can provide and the improvements they reward. Pretraining develops broad programming knowledge, while subsequent specialization and post-training strengthen selected capabilities through curated data and feedback. Rajbahadur et al. [9] describe post-training as programming with data: training examples act as instructions, their mixture forms the program, and the checkpoint is the compiled result. Repository histories and executable tests make issue resolution an attractive training target, as SWE-Gym and SWE-smith demonstrate [10], [11]. OpenAI, Anthropic, and Microsoft describe evaluation-driven development, where measured weaknesses guide subsequent improvements [12]–[14]. Under finite budgets, public leaderboard incentives can further steer training toward benchmark gains, which Chen et al. [15] call benchmarking. This practice raises three challenges. First (C1), data availability and evaluation priorities can leave gaps in verified training data needed to improve specific engineering capabilities and demonstrate those improvements [16]. Second (C2), benchmark-oriented gains do not consistently transfer to other coding tasks [17]. Third (C3), training trajectories encode harness-specific conventions, and improvements can diminish or reverse when the harness changes [18], [19]. These challenges highlight the limits of relying on readily available training data and benchmark gains to develop engineering competence systematically.

A coding LLM serving diverse engineering workloads needs capabilities that extend beyond the benchmarks and harnesses used to develop them. Our team maintains a coding LLM used by over 100,000 developers across diverse repositories, workflows, and systems that have evolved over decades (Section II). Developers access the coding LLM through different coding agents and rely on it to maintain existing software as well as implement new functionality. We therefore explored a complementary hypothesis, which we call capability-focused training: strengthening a foundational engineering capability can improve the related tasks and workflows that depend on it. We selected refactoring as an initial case because it exercises code localization, dependency reasoning, coordinated modification, and behavior preservation. The challenge was to construct reliable training data for these operations and determine whether the improvements transferred beyond the targeted tasks and training harness.

If post-training is programming with data, software engineering (SE) expertise should help write the program. Decades of SE research and practices have produced knowledge and tools for specifying, modifying, and verifying software. We argue that this knowledge should shape what coding LLMs learn, not merely evaluate their outputs or establish safeguards around them. Prior systems such as EM-Assist and RefactoringMirror combine LLMs with program analysis and IDE tools to support individual refactorings [20], [21]. RefactorForge applies established SE techniques to construct verifiable training data for improving the model itself, with refactoring as the organizing capability. Refactoring preconditions and program analysis identify eligible examples, PyCharm and Ruff construct reference transformations, and structural and regression tests that determine which teacher-generated trajectories qualify for training. Building this data presents challenges. For example, repository histories can intertwine refactorings with other changes, while LLM-generated transformations require independent verification. We therefore began with seven bounded, tool-verifiable refactoring types, predominantly re-names. We report the data construction process, empirical outcomes, and engineering lessons as an industrial case study rather than proposing a new training algorithm.

Our results indicate that SE-guided training data can improve a targeted engineering capability and transfer to related tasks that are not explicitly covered during training. RefactorForge constructed 5,704 executable tasks from 306 Python repositories and retained 4,572 verified trajectories. For C1, incremental fine-tuning of an existing 92B coding LLM on these trajectories, comprising 72.51 million tokens, i.e., 0.46% of its preceding coding mixture, improved performance by 18.00 percentage points on RefactorBench and 7.06 points on SWE-Bench ProMax. The gains extended to related SWE issue-resolution tasks (C2), with improvements of 4.97 points on SWE-Bench Verified and 1.23 points on SWE-Bench Pro. Although we collected the training trajectories using OpenCode, the fine-tuned coding LLM achieved higher average scores under all four evaluated harnesses (C3), including a statistically significant improvement under Mini-SWE-Agent on SWE-Bench Verified (p = 0.002). Transfer remained task-dependent: performance on greenfield repository generation improved under two harnesses but regressed under two others. These findings demonstrate the potential of training interventions focused on a bounded capability, while underscoring the challenges of consistent transfer across tasks and harnesses.

As coding LLMs increasingly contribute to software development, SE must shape how these models are developed. Debates over agentic and AI-native SE largely focus on how engineers will work with these systems [22], [23]. Our industrial case study demonstrates a complementary role: we used established SE knowledge to select engineering capabilities, construct verified training data, and evaluate model improvements. Building RefactorForge also revealed practical challenges, including losses during training-data construction, the constraints verification imposes on capability coverage, and the need to assess improvements and regressions across workloads and agent harnesses. Building on this experience, we call on the SE community to contribute directly to coding LLM training, develop engineering methods for model development and maintenance, and systematically define the capabilities these models should acquire, drawing on established knowledge in SWEBOK [24].

II. INDUSTRIAL BACKGROUND AND MOTIVATION

References (69)