Abstract

During the past decades, researchers have proposed numerous studies to predict bugs at different granularity levels, such as the file level, package level, module level, etc. However, the prediction models at the method level are rarely investigated. In this paper, we investigate to predict bug-prone methods based on method-level code metrics or history measures, and analyze the prediction importance of each metric. To proceed our study, we first propose a series of code metrics and history measures for conducting method-level bug predictions. Next, we compare the performance of different types of prediction models. Finally, we conduct analyses about the prediction power of each metric, based on which, we further analyze whether we can simplify the prediction models. Through our evaluation on eighteen large-scale projects, we have presented: (1) conducting method-level bug prediction has potentials of saving a large portion of effort on code reviews and inspections; (2) models using the proposed code metrics or history measures could achieve a good prediction performance; (3) the prediction importance of each metric distributes differently; (4) a highly simplified prediction model could be derived by just using a few important metrics. This study presents how to systematically build models for predicting bug-prone methods, and provides empirical evidence for developers to best select metrics to build method-level bug prediction models.

Full Text
Paper version not known

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call