Technical debt is a metaphor for seeking short-term gains at expense of long-term code quality.Previous studies have shown that self-admitted technical debt,which is introduced intentionally,has strong negative impact...Technical debt is a metaphor for seeking short-term gains at expense of long-term code quality.Previous studies have shown that self-admitted technical debt,which is introduced intentionally,has strong negative impacts on software development and incurs high maintenance overheads.To help developers identify self-admitted technical debt,researchers have proposed many state-of-the-art methods.However,there is still room for improvement about the effectiveness of the current methods,as self-admitted technical debt comments have the characteristics of length variability,low proportion and style diversity.Therefore,in this paper,we propose a novel approach based on the bidirectional long short-term memory(BiLSTM)networks with the attention mechanism to automatically detect self-admitted technical debt by leveraging source code comments.In BiLSTM,we utilize a balanced cross entropy loss function to overcome the class unbalance problem.We experimentally investigate the performance of our approach on a public dataset including 62,566 code comments from ten open source projects.Experimental results show that our approach achieves 81.75%in terms of precision,72.24%in terms of recall and 75.86%in terms of F1-score on average and outperforms the state-of-the-art text mining-based method by 8.14%,5.49%and 6.64%,respectively.展开更多
基金This work was partially supported by the National Natural Science Foundation of China(Grants Nos.61100043,61902096 and 61702144)Key Project of Science and Technology of Zhejiang Province(2017C01010).
文摘Technical debt is a metaphor for seeking short-term gains at expense of long-term code quality.Previous studies have shown that self-admitted technical debt,which is introduced intentionally,has strong negative impacts on software development and incurs high maintenance overheads.To help developers identify self-admitted technical debt,researchers have proposed many state-of-the-art methods.However,there is still room for improvement about the effectiveness of the current methods,as self-admitted technical debt comments have the characteristics of length variability,low proportion and style diversity.Therefore,in this paper,we propose a novel approach based on the bidirectional long short-term memory(BiLSTM)networks with the attention mechanism to automatically detect self-admitted technical debt by leveraging source code comments.In BiLSTM,we utilize a balanced cross entropy loss function to overcome the class unbalance problem.We experimentally investigate the performance of our approach on a public dataset including 62,566 code comments from ten open source projects.Experimental results show that our approach achieves 81.75%in terms of precision,72.24%in terms of recall and 75.86%in terms of F1-score on average and outperforms the state-of-the-art text mining-based method by 8.14%,5.49%and 6.64%,respectively.