News thumbnail
Science / Sat, 28 Nov 2026 Nature

Comparative evaluation of lexical machine learning, CodeBERT fine-tuning, prompt-based large language models, and retrieval-augmented generation for self-admitted technical debt detection

Self-Admitted Technical Debt (SATD) refers to explicit acknowledgements of technical debt by developers in software artifacts, such as source-code comments and issue-tracker discussions. Automated SATD detection can support software maintenance by helping developers identify known limitations, shortcuts, workarounds, incomplete implementations, and deferred improvements. The study includes both in-domain evaluation on source-code comments and cross-dataset evaluation from source-code comments to issue-tracker discussions. The evaluated prompt-based language model shows conservative classification behavior under the evaluated prompt, achieving high precision in some settings but low recall. Overall, the study provides a bounded empirical comparison of lexical, transformer-based, prompt-based, and retrieval-augmented SATD detection approaches under a unified experimental protocol.

Self-Admitted Technical Debt (SATD) refers to explicit acknowledgements of technical debt by developers in software artifacts, such as source-code comments and issue-tracker discussions. Automated SATD detection can support software maintenance by helping developers identify known limitations, shortcuts, workarounds, incomplete implementations, and deferred improvements. Earlier SATD detection studies mainly relied on traditional machine-learning methods and feature-engineered textual representations. Recent progress in transformer architectures and Large Language Models (LLMs) has created new opportunities for SATD detection; however, the relative behavior of fine-tuned code-aware transformers, prompt-based LLM classification, and retrieval-augmented LLM inference remains insufficiently examined under a common evaluation protocol. This study presents a controlled empirical comparison of four SATD detection paradigms: TF-IDF with Logistic Regression, CodeBERT fine-tuning, prompt-based Large Language Model inference, and Retrieval-Augmented Generation using an LLM. The evaluation uses two publicly available SATD benchmark datasets and one author-curated build-configuration SATD retrieval corpus constructed from publicly accessible build-configuration files. These resources represent source-code comments, issue-tracker discussions, and build-configuration SATD comments. The experiments use three balanced D1 sampled-pool conditions of 200, 1500, and 5000 instances. For TF-IDF with Logistic Regression and CodeBERT, each sampled pool is divided using a stratified 80:20 split for supervised training and in-domain evaluation, whereas the prompt-based LLM is evaluated through inference without parameter training. The study includes both in-domain evaluation on source-code comments and cross-dataset evaluation from source-code comments to issue-tracker discussions. The results show that CodeBERT achieves the highest mean in-domain performance among the evaluated approaches that use supervised training, especially under the larger supervised D1 training conditions. However, this advantage is not observed in the D1 → D2 setting, where CodeBERT and TF-IDF obtain comparable F1 scores. This performance drop reflects cross-artifact domain shift from source-code comments to issue-tracker discussions. The TF-IDF baseline remains competitive in cross-dataset evaluation, indicating that lexical features still provide useful transfer signals for SATD detection across artifacts. The evaluated prompt-based language model shows conservative classification behavior under the evaluated prompt, achieving high precision in some settings but low recall. The evaluated RAG configuration did not improve the measured SATD detection performance under the selected retrieval corpus, embedding model, top-k value, prompt design, and output parsing protocol. Sensitivity and diagnostic analyses showed that four-shot prompting improved the prompt-based LLM compared with zero-shot prompting, especially on the balanced D1 and D2 subsets, although the improvement was not sufficient to surpass the supervised models. Evaluation on the original imbalanced D1 and D2 distributions further showed that SATD detection remains sensitive to class imbalance and cross-artifact transfer, particularly in terms of precision and PR-AUC. The RAG ablation showed that varying the retrieval corpus, top-k value, and similarity-threshold setting did not remove the low-recall behavior of the evaluated RAG configuration. Overall, the study provides a bounded empirical comparison of lexical, transformer-based, prompt-based, and retrieval-augmented SATD detection approaches under a unified experimental protocol.

© All Rights Reserved.