Detecting Technical Debt in Source Code Changes using Large Language Models
Technical Debt (TD) remains a critical challenge in software engineering, degrading maintainability and long-term quality. While traditional TD detection methods rely heavily on static analysis and manual inspection, recent advances in Large Language Models (LLMs) offer a compelling new approach for automating and scaling this process. In this paper, we present DebtGuardian, the first open-source LLM-based framework for detecting TD directly from source code changes. DebtGuardian combines zero-shot and few-shot prompting strategies, supports both granular and batch-level detection, and employs Guardrails-AI for validating and standardizing model outputs. To enhance robustness, it enables majority voting across multiple LLMs. We evaluate DebtGuardian using the MLCQ dataset, a publicly available benchmark comprising over 10,000 real-world code change instances manually annotated with different TD types (design, documentation, testing, etc.). Our study includes state-of-the-art open-source LLMs—both general-purpose and code-specialized. The results demonstrate that granular prompting, code-specialized models, and larger context windows significantly improve TD detection performance. Majority voting boosts recall by 8.17%, showing clear benefits in model ensemble strategies. We also conduct a detailed evaluation of line-level metrics and find that using a 10-line threshold achieves the best balance between precision and tolerance for small discrepancies in predicted TD locations. DebtGuardian advances the field by offering a flexible, extensible, and empirically validated LLM-based solution for TD detection. Our framework paves the way for integrating AI-driven analysis into continuous integration pipelines, making TD management more scalable and accurate in modern software development workflows.
Tue 2 DecDisplayed time zone: Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna change
09:30 - 11:00 | Technical Debt and RefactoringShort Papers and Posters / Research Papers at Sala degli Affreschi (Fresco Room) Chair(s): Sousuke Amasaki Nanzan University | ||
09:30 15mTalk | Enhancing Python Code Maintainability through Large Language Model-Based Approaches Research Papers | ||
09:45 15mTalk | Enhancing Software Maintainability through LLM-Assisted Code Refactoring Research Papers Tommaso Fulcini Politecnico di Torino, Riccardo Coppola Politecnico di Torino, Flavio Giobergia Politecnico di Torino, Amirali Changizi Politecnico di Torino, Meelad Dashti Politecnico di Torino, Kimia Dorrani Politecnico di Torino, Domenico Amalfitano University of Naples Federico II, Damiano Distante UnitelmaSapienza University of Rome, Filippo Ricca DIBRIS, Università di Genova | ||
10:00 15mTalk | Temporal Evolution of Architectural Complexity and Technical Debt in Microservices: An Exploratory Case Study Research Papers Bhuwan Paudel Blekinge Institute of Technology, Javier Gonzalez-Huerta Blekinge Institute of Technology, Ehsan Zabardast Nordea / Blekinge Institute of Technology | ||
10:15 15mTalk | Detecting Technical Debt in Source Code Changes using Large Language Models Research Papers Merve Astekin SINTEF, Arda Goknil SINTEF Digital, Sagar Sen , Simeon Tverdal SINTEF Digital, Phu Nguyen SINTEF | ||
10:30 7mTalk | LLM-based Multi-Agent System for Intelligent Refactoring of Haskell Code Short Papers and Posters Shahbaz Siddeeq Tampere University, Muhammad Waseem Faculty of Information Technology and Communication Sciences, Tampere University, 33014 Tampere, Finland, Zeeshan Rasheed Tampere University, Md Mahade Hasan Tampere University, Jussi Rasku Tampere University, Mika Saari Tampere University, Henri Terho Eficode Oy, Kalle Mäkelä Eficode Oy, Kai-Kristian Kemell Tampere University, Pekka Abrahamsson Tampere University | ||
10:37 7mTalk | Architecture Degradation at Scale: Challenges and Insights from Practice Short Papers and Posters Ehsan Zabardast Nordea / Blekinge Institute of Technology, Bhuwan Paudel Blekinge Institute of Technology, Javier Gonzalez-Huerta Blekinge Institute of Technology DOI Authorizer link File Attached | ||
10:44 7mTalk | How Well Small Language Models Can Be Adapted for Software Maintenance and Refactoring Tasks Short Papers and Posters Gabija Asvydyte University of Groningen, Sushant Kumar Pandey University of Groningen, The Netherlands, Sivajeet Chand Technical University of Munich | ||