Visible to the public Cross-Entropy: A New Metric for Software Defect Prediction

TitleCross-Entropy: A New Metric for Software Defect Prediction
Publication TypeConference Paper
Year of Publication2018
AuthorsZhang, Xian, Ben, Kerong, Zeng, Jie
Conference Name2018 IEEE International Conference on Software Quality, Reliability and Security (QRS)
Date Publishedjul
ISBN Number978-1-5386-7757-5
Keywordscode metric, code naturalness, Computer bugs, cross-entropy, Deep Learning, DefectLearner, Entropy, language model, Measurement, Metrics, natural language processing, Predictive models, predictive security metrics, program debugging, pubcrawl, recurrent neural nets, recurrent neural network language model, Semantics, Software, software bugs, software defect prediction, software metrics, software quality, software quality assurance, software repository, source code, source code (software), Task Analysis

Defect prediction is an active topic in software quality assurance, which can help developers find potential bugs and make better use of resources. To improve prediction performance, this paper introduces cross-entropy, one common measure for natural language, as a new code metric into defect prediction tasks and proposes a framework called DefectLearner for this process. We first build a recurrent neural network language model to learn regularities in source code from software repository. Based on the trained model, the cross-entropy of each component can be calculated. To evaluate the discrimination for defect-proneness, cross-entropy is compared with 20 widely used metrics on 12 open-source projects. The experimental results show that cross-entropy metric is more discriminative than 50% of the traditional metrics. Besides, we combine cross-entropy with traditional metric suites together for accurate defect prediction. With cross-entropy added, the performance of prediction models is improved by an average of 2.8% in F1-score.

Citation Keyzhang_cross-entropy:_2018