ISSN 1000-1239 CN 11-1777/TP

计算机研究与发展 ›› 2020, Vol. 57 ›› Issue (3): 461-473.doi: 10.7544/issn1000-1239.2020.20190606

所属专题: 2020面向服务的群智化生态化软件开发方法专题

• 软件技术 • 上一篇    下一篇



  1. (武汉大学计算机学院 武汉 430072) (
  • 出版日期: 2020-03-01
  • 基金资助: 

An Automatic Method Using Hybrid Neural Networks and Attention Mechanism for Software Bug Triaging

Liu Ye, Huang Jinxiao, Ma Yutao   

  1. (School of Computer Science, Wuhan University, Wuhan 430072)
  • Online: 2020-03-01
  • Supported by: 
    This work was supported by the National Key Research and Development Program of China (2018YFB1003801), the National Natural Science Foundation of China (61832014, 61672387, 61572371), and the Natural Science Foundation of Hubei Province of China (2018CFB511).

摘要: 软件缺陷修复是软件质量保证的一个重要环节.在互联网上开源、开放的群智化软件开发环境中,提升缺陷分派的效率和效果,有助于提高缺陷修复率并降低维护成本.目前,基于机器学习的缺陷自动分派方法已成为主流技术,但也存在特征人工构建、文本表示能力不足等问题.近年来,鉴于深度学习在自然语言处理领域的成功应用,研究者尝试将深度学习技术引入缺陷分派任务中,使得缺陷修复者的预测效果有了显著提高.然而,不同类型的神经网络亦存在各自的局限性.针对上述问题,将缺陷自动分派任务视为文本分类问题,结合卷积神经网络、循环神经网络和注意力机制各自的优势,提出了一种基于混合神经网络和注意力机制的缺陷自动分派方法Atten-CRNN,能更有效地捕获缺陷报告的重要文本特征和序列特征,从而提供更精准的缺陷修复者推荐服务.在Eclipse和Mozilla两个大型的知名软件开源项目中进行了实证研究,在20万量级的缺陷报告上的实验结果表明:无论是否考虑注意力机制,Atten-CRNN的预测准确率要高于基于卷积神经网络和基于循环神经网络的基准模型.

关键词: 缺陷分派, 文本分类, 卷积神经网络, 循环神经网络, 注意力

Abstract: Software defect repair (also known as software bug fixing) is a necessary part of software quality assurance. In the collective-intelligence-based software development environment on the Internet, improving the efficiency and effectiveness of software bug triaging can help raise bug fixing rates and reduce maintenance costs. Nowadays, automatic bug triaging approaches based on machine learning have become mainstream, but they also have some specific problems, such as hand-crafted features and an insufficient ability to represent texts. Considering successful applications of deep learning in the field of natural language processing, researchers have recently tried to introduce deep learning into the field of automatic bug triaging, to improve the performance of predicting the right bug fixer significantly. However, different types of neural networks have their limitations. To address the problems mentioned above, in this study, we regard bug triaging as a text classification problem and propose an automatic bug triaging approach based on hybrid neural networks and an attention mechanism, called Atten-CRNN. Because Atten-CRNN combines the advantages of a convolutional neural network, a recurrent neural network, and an attention mechanism, it can capture essential text features and sequence features of bug reports more effectively and then provide more accurate fixer recommendation services for software development and maintenance. An empirical study was conducted on two popular large-scale open-source software projects, namely Eclipse and Mozilla. The experimental results obtained from over 200 000 bug reports indicate that Atten-CRNN achieves higher prediction accuracy than convolutional neural networks and recurrent neural networks, regardless of the attention mechanism.

Key words: bug triaging, text classification, convolutional neural network, recurrent neural network, attention