摘要
Defect prediction assists the rational allocation of testing resources by detecting the potentially defective software modules before releasing products. When a project has no historical labeled defect data, cross project defect prediction (CPDP) is an alternative technique for this scenario. CPDP utilizes labeled defect data of an external project to construct a classification model to predict the module labels of the current project. Transfer learning based CPDP methods are the current mainstream. In general, such methods aim to minimize the distribution differences between the data of the two projects. However, previous methods mainly focus on the marginal distribution difference but ignore the conditional distribution difference, which will lead to unsatisfactory performance. In this work, we use a novel balanced distribution adaptation (BDA) based transfer learning method to narrow this gap. BDA simultaneously considers the two kinds of distribution differences and adaptively assigns different weights to them. To evaluate the effectiveness of BDA for CPDP performance, we conduct experiments on 18 projects from four datasets using six indicators (i.e., F-measure, g-means, Balance, AUC, EARecall, and EAF-measure). Compared with 12 baseline methods, BDA achieves average improvements of 23.8%, 12.5%, 11.5%, 4.7%, 34.2%, and 33.7% in terms of the six indicators respectively over four datasets.
基金
partially supported by the National Key Research and Development Program of China under Grant No.2018YFC1604000
the National Natural Science Foundation of China under Grant Nos. 61602258,61572374,and U163620068
the China Postdoctoral Science Foundation under Grant No. 2017M621247
the Natural Science Foundation of Heilongjiang Province of China under Grant No.LH2019F008,Heilongjiang Postdoctoral Science Foundation under Grant No.LBH-Z17047
the Open Fund of Key Laboratory of Network Assessment Technology from Chinese Academy of Sciences,Guangxi Key Laboratory of Trusted Software under Grant No. kx201607
the Academic Team Building Plan for Young Scholars from Wuhan University under Grant No. WHU2016012,
Hong Kong GRC (Research Grants Council) Project under Grant Nos. PolyU 152223/17E and PolyU 152239/18E.