arrow
Return

Detecting Technical Debt in Source Code Changes Using Large Language Models

delete2026-01-01
delete0
PRE
AI
M
Merve Astekin *
A
Arda Göknil
S
Sagar Sen
S
Simeon Tverdal
P
Phu H. Nguyen
DOI:10.1007/978-3-032-12089-2_21delete
deleteOriginal
deleteOriginal request for help
deleteShare
deleteSave
Abstract

Abstract

En 中文
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, applying a variety of state-of-the-art open-source LLMs specialized for code understanding, as well as general-purpose LLMs. 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.
Keywords:
Software quality
Technical debt detection
Large language models

Journal

P
PRODUCT-FOCUSED SOFTWARE PROCESS IMPROVEMENT, PROFES 2025
IF:
0
Papers:
40
Citations:
0

Organization

S
sintef
Scholars:
376
Papers: 174
Citations: 5
Cited Papers

Cited Papers

Estimating the Principal of an Application's Technical Debt
err2012-11-01
err77
PREAI
errCurtis, Bill; Sappidi, Jay; Szynkarski, Alexandra
errShare
errSave
Identifying self-admitted technical debt through code comment analysis with a contextualized vocabulary
err2020-05-01
err21
PREAI
errde Freitas Farias, Mario Andre; de Mendonca Neto, Manoel Gomes; Kalinowski, Marcos; Spinola, Rodrigo Oliveira
errShare
errSave
MLCQ
err2020-04-17
err0
PREAI
errLech Madeyski; Tomasz Lewowski
errShare
errSave
Technical Debt predictive model through Temporal Convolutional Network
err2021-07-18
err0
PREAI
errLerina Aversano; Mario Luca Bernardi; Marta Cimitile; Martina Iammarino
errShare
errSave
Evaluating the agreement among technical debt measurement tools: building an empirical benchmark of technical debt liabilities
err2020-08-26
err25
PREAI
errAmanatidis, Theodoros; Mittas, Nikolaos; Moschou, Athanasia; Chatzigeorgiou, Alexander; Ampatzoglou, Apostolos; Angelis, Lefteris
errShare
errSave
Managing technical debt in software-reliant systems
err2010-11-07
err0
PREAI
errNanette Brown; Yuanfang Cai; Yuepu Guo; Rick Kazman; Miryung Kim; Philippe Kruchten; Erin Lim; Alan MacCormack; Robert Nord; Ipek Ozkaya; Raghvinder Sangwan; Carolyn Seaman; Kevin Sullivan; Nico Zazworka
errShare
errSave
researcher View more