一句话:实证评估神经生成模型与LLM自动偿还自承认技术债的能力,发现效果有限。
论文关注软件开发中由开发者通过注释记录的自承认技术债(SATD)能否被自动偿还。作者从595个开源项目抽取5039个SATD移除实例,系统比较七种生成式深度学习配置,涉及不同预训练与微调目标,包括通用代码变更修复、SATD移除和基于SATD注释的提示微调,并测试了近期LLM聊天机器人的适用性。结果显示SATD自动偿还是困难任务:最佳模型在允许多次尝试时仅能自动修复约2%至8%的测试实例;微调数据规模有限(约5k)使预训练至关重要;若不提供记录SATD的注释,移除能力显著下降;通用LLM并不具竞争力。
Upon evolving their software, organizations and individual developers have to spend a substantial effort to pay back technical debt, i.e, the fact that software is released in a shape not as good as it should be, e.g, in terms of functionality, reliability, or maintainability. This paper empirically investigates the extent to which technical debt can be automatically paid back by neural-based generative models, and in particular models exploiting different strategies for pre-training and fine-tuning. We start by extracting a dateset of 5,039 Self-Admitted Technical Debt (SATD) removals from 595 open-source projects. SATD refers to technical debt instances documented (e.g, via code comments) by developers. We use this dataset to experiment with seven different generative deep learning (DL) model configurations. Specifically, we compare transformers pre-trained and fine-tuned with different combinations of training objectives, including the fixing of generic code changes, SATD removals, and SATD-comment prompt tuning. Also, we investigate the applicability in this context of a recently-available Large Language Model (LLM)-based chat bot. Results of our study indicate that the automated repayment of SATD is a challenging task, with the best model we experimented with able to automatically fix ∼2% to 8% of test instances, depending on the number of attempts it is allowed to make. Given the limited size of the fine-tuning dataset (∼5k instances), the model's pre-training plays a fundamental role in boosting performance. Also, the ability to remove SATD steadily drops if the comment documenting the SATD is not provided as input to the model. Finally, we found general-purpose LLMs to not be a competitive approach for addressing SATD.
DOI 原文 · arXiv · PDF(开放获取) · DBLP
@inproceedings{abs-2308-08943,
title = {Towards Automatically Addressing Self-Admitted Technical Debt: How Far Are We?},
author = {Antonio Mastropaolo and Massimiliano Di Penta and Gabriele Bavota},
booktitle = {ASE},
year = {2023},
doi = {10.1109/ase56229.2023.00103}
}