SmellBench: Evaluating LLM Agents on Architectural Code Smell Repair
- URL: http://arxiv.org/abs/2605.07001v2
- Date: Tue, 12 May 2026 16:50:41 GMT
- Title: SmellBench: Evaluating LLM Agents on Architectural Code Smell Repair
- Abstract summary: Architectural code smells erode software maintainability and are costly to repair manually.<n>We present the first empirical evaluation of large language model agents on architectural code smell repair.<n>We contribute SmellBench, a task orchestration framework that incorporates smell-type-specific optimized prompts.
- Score: 1.6922906233636834
- License: http://creativecommons.org/licenses/by-nc-nd/4.0/
- Abstract: Architectural code smells erode software maintainability and are costly to repair manually, yet unlike localized bugs, they require cross-module reasoning about design intent that challenges both developers and automated tools. While large language model agents excel at bug fixing and code-level refactoring, their ability to repair architectural code smells remains unexplored. We present the first empirical evaluation of LLM agents on architectural code smell repair. We contribute SmellBench, a task orchestration framework that incorporates smell-type-specific optimized prompts and supports iterative multi-step execution, together with a scoring methodology that separately evaluates repair effectiveness, false positive identification, and net codebase impact. We evaluate 11 agent configurations from four model families (GPT, Claude, Gemini, Mistral) on 65 hard-severity architectural smells detected by PyExamine in the Python project scikit-learn, validated against expert judgments. Expert validation reveals that 63.1% of detected smells are false positives, while the best agent achieves a 47.7% resolution rate. Agents identify false positives with up to $κ= 0.94$ expert agreement, but repair aggressiveness and net codebase quality are inversely related: the most aggressive agent introduces 140 new smells. These findings expose a gap between current LLM capabilities in localized code transformations and the architectural understanding needed for cross-module refactoring. SmellBench provides reusable infrastructure for tracking progress on this underexplored dimension of automated software engineering. We release our code and data at https://doi.org/10.5281/zenodo.19247588.
Related papers
- REFINE: A Multi-Agent LLM Approach for Evidence-Guided Code Refactoring [3.294884078309524]
REFINE is a tool-agnostic, evidence-aware multi-agent approach for generating Java file-level candidates.<n>We evaluate REFINE on 450 Java files from 15 open-source systems.
arXiv Detail & Related papers (2026-08-21T17:44:40Z) - Fantastic Adaptive Taxonomies and How to Use Them [100.20614173157708]
AdaMAST converts execution traces into a compact, evidence-grounded failure taxonomy.<n>No code is hand-authored, no trace human-annotated.<n>In agent-system search, taxonomy-coded diagnoses of failed candidates outperform free-form.
arXiv Detail & Related papers (2026-07-17T17:41:16Z) - SmellBench: Towards Fine-Grained Evaluation of Code Agents on Refactoring Tasks [34.43588103259487]
SmellBench proactively injects code smells into clean code from real-world repositories.<n>It contains 294 cases spanning 7 popular smell types, 3 difficulty levels, 2 instruction settings across 7 real-world repositories.<n>Experiments show that the best combination - Qwenwen Code + Sonnet 4.5 - achieved only a 50.34 score of smell elimination.
arXiv Detail & Related papers (2026-06-04T01:49:07Z) - SlopCodeBench: Benchmarking How Coding Agents Degrade Over Long-Horizon Iterative Tasks [55.76734816061826]
We introduce SlopCodeBench, a language-agnostic benchmark comprising 20 problems and 93 checkpoints.<n>We track two trajectory-level quality signals: verbosity, the fraction of redundant or duplicated code, and structural erosion.<n>No agent solves any problem end-to-end across 11 models; the highest checkpoint solve rate is 17.2%.
arXiv Detail & Related papers (2026-03-25T19:26:44Z) - Architecture-Aware Multi-Design Generation for Repository-Level Feature Addition [53.50448142467294]
RAIM is a multi-design and architecture-aware framework for repository-level feature addition.<n>It shifts away from linear patching by generating multiple diverse implementation designs.<n>Experiments on the NoCode-bench Verified dataset demonstrate that RAIM establishes a new state-of-the-art performance.
arXiv Detail & Related papers (2026-03-02T12:50:40Z) - A Causal Perspective on Measuring, Explaining and Mitigating Smells in LLM-Generated Code [49.09545217453401]
Propensity Smelly Score (PSC) is a metric that estimates the likelihood of generating particular smell types.<n>We identify how generation strategy, model size, model architecture and prompt formulation shape the structural properties of generated code.<n> PSC helps developers interpret model behavior and assess code quality, providing evidence that smell propensity signals can support human judgement.
arXiv Detail & Related papers (2025-11-19T19:18:28Z) - Where LLM Agents Fail and How They can Learn From Failures [62.196870049524364]
Large Language Model (LLM) agents have shown promise in solving complex, multi-step tasks.<n>They amplify vulnerability to cascading failures, where a single root-cause error propagates through subsequent decisions.<n>Current systems lack a framework that can comprehensively understand agent error in a modular and systemic way.<n>We introduce the AgentErrorTaxonomy, a modular classification of failure modes spanning memory, reflection, planning, action, and system-level operations.
arXiv Detail & Related papers (2025-09-29T18:20:27Z) - ROSE: Transformer-Based Refactoring Recommendation for Architectural Smells [3.946103868607285]
Existing tools detect such smells but rarely suggest how to fix them.<n>We frame the task as a three-class classification problem and fine-tune both models on over 2 million instances mined from 11,149 open-source Java projects.<n>Our results show that transformer-based models can effectively bridge the gap between smell detection and actionable repair.
arXiv Detail & Related papers (2025-07-16T18:19:51Z) - Turning the Tide: Repository-based Code Reflection [52.13709676656648]
We introduce LiveRepoReflection, a benchmark for evaluating code understanding and generation in multi-file repository contexts.<n>1,888 rigorously filtered test cases across $6$ programming languages to ensure diversity, correctness, and high difficulty.<n>We also create RepoReflection-Instruct, a large-scale, quality-filtered instruction-tuning dataset derived from diverse sources.
arXiv Detail & Related papers (2025-07-14T02:36:27Z)
This list is automatically generated from the titles and abstracts of the papers in this site.
This site does not guarantee the quality of this site (including all information) and is not responsible for any consequences.