• 中国计算机学会会刊
  • 中国科技核心期刊
  • 中文核心期刊

J4 ›› 2016, Vol. 38 ›› Issue (05): 932-937.

• 论文 • Previous Articles     Next Articles

A software defect prediction method based on topic model       

ZHANG Zetao1,2,YE Lijun1,2,CHENG Wei1,2,GU Jun1,2   

  1. (1.Shanghai Key Laboratory of Aerospce Intelligent Control Technology,Shanghai 201109;2.Shanghai Insitute of Spaceflight Control Technology,Shanghai 201109,China)
  • Received:2015-02-02 Revised:2015-12-03 Online:2016-05-25 Published:2016-05-25

Abstract:

Traditional models for defect prediction always consider the textual features of source codes, comments, etc, ignoring hidden topics such as technical aspects, business logics, etc. To solve these problems, we present a new topicbased defect prediction model. The software corpus is assumed to be composed by a collection of different topics and technical aspects which lead to different defect tendencies. A set of topicbased metrics are proposed. Then, the LDA topic model is adopted to generate topics and the corresponding parameters, and the prediction model is trained by both topic metrics as well as some traditional metrics. Experimental results show that the proposed method outperforms traditional defect prediction methods and can also ensure a stable model through the evolution of software, which means the new method can be efficiently used in defect prediction tasks in software engineering.

Key words: topic model;software defect prediction;software engineering