摘要
为提高航天软件测试的效率和质量,针对同公司航天软件数量少、研制周期长的特点,提出了一种跨公司航天软件缺陷预测方法。从航天软件背景信息复杂、规模大、功能独立等特征出发,提出基于静态分类缺陷预测的模型构建思想。引入迁移学习方法,利用最近邻分类器和数据引力模型,对训练数据的分布特征进行修正,提高训练数据与目标数据的相似性;为提高模型的泛化能力以适应目标数据的多样性,提出在训练数据中加入少量目标数据用于模型训练。将该方法在实际工程中进行应用,实验结果表明,与已有软件缺陷预测方法相比,该方法在保持较低误报率(不高于0.3)的情况下可有效提高召回率(接近0.6),整体可信度得到有效增强(G-measure超过0.6),方法稳定度高,泛化能力较强;本方法在实际工程中对测试规模影响可控,测试效率得到提高。
In order to improve the efficiency and quality of aerospace software testing,an approach to cross-company aerospace software defect prediction was proposed,especially for the scarcity of withincompany software and the long cycle of development.Considering the complexity,large scale,and independent functions of aerospace software,the idea of building a defect prediction model based on static classification was proposed.In this paper,the transfer learning method was introduced.Using the nearest neighbor classifier and data gravity model,the distribution characteristics of training data were corrected to improve the similarity between training data and target data.In order to improve the generalization ability of the model to adapt to the diversity of target data,a small amount of target data was added to the training data for model training.The approach was applied to the test for aerospace software testing.The results of application show that,compared with existing software defect prediction methods,the proposed method can effectively improve the recall rate(close to 0.6)with a low false alarm rate(not higher than 0.3).The overall credibility is effectively enhanced(Gmeasure is over 0.6),and the method has high stability and strong generalization ability.This method can control the test scale in practical projects and improve testing efficiency.
引文
[1]王俊杰,沈湘衡,张波,等.环境参数与状态参数融合的测试用例集约简方法[J].光学精密工程,2009,17(7):1678-1685.WANG J J,SHEN X H,ZHANG B,et al..Optimal test suite generation methods based on fusion of environment and state parameters[J].Opt.Precision Eng.,2009,17(7):1678-1685.(in Chinese)
[2]苗悦,王峰.敏捷成像卫星“逐级择优”在轨任务实时规划[J].光学精密工程,2018,26(1):150-160.MIAO Y,WANG F.Optimize-by-priority on-orbit task real-time planning for agile imaging satellite[J].Opt.Precision Eng.,2018,26(1):150-160.(in chinese)
[3]MCCABE T J.A complexity measure[J].IEEETransactions on Software Engineering,1976,SE-2(4):308-320.
[4]CHIDAMBER S R,KEMERER C.A metrics suite for object oriented design[J].IEEE Transactions on Software Engineering,1994,20(6):476-493.
[5]陈翔,王莉萍,顾庆,等.跨项目软件缺陷预测方法研究综述[J].软件学报,2018,41(1):254-274.CHEN X,WANG L P,GU Q,et al..A survey on cross-project software defect prediction methods[J].Journal of Software,2018,41(1):254-274.(in Chinese)
[6]TURHAN B,MENZIES T,Bener A B,et al..On the relative value of cross-company and within-company data for defect prediction[J].Empirical Software Engineering,2009,14(5):540-578..
[7]ZIMMERMANN T,NAGAPPAN N,GALL H,et al..Cross-project defect prediction:a large scale experiment on data vs.domain vs.process[C].Proc.Joint Meeting of the European Software Engineering Conference and the ACM Sigsoft Symposium on the Foundations of Software Engineering.,2009:91-100.
[8]LIU D,LIANG D.Three-way decisions in ordered decision system[J].Knowledge-Based Systems,2017,137(12):182-195.
[9]Ma Y,Luo G,Zeng X,et al..Transfer learning for cross-company software defect prediction[J].Information&Software Technology,2012,54(3):248-256.
[10]ZHANG,FENG,MOCKUS,et al..Towards building a universal defect prediction model[J].Empirical Software Engineering,2016,21(5):2107-2145.
[11]KAMEI Y,FUKUSHIMA T,MCINTOSH S,et al..Studying just-in-time defect prediction using cross-project models[J].Empirical Software Engineering,2016,21(5):2072-2106.
[12]ZHANG F,ZHENG Q,ZOU Y,et al..Crossproject defect prediction using a connectivity-based unsupervised classifier[C].Ieee/acm,International Conference on Software Engineering.IEEE,2017:309-320.
[13]KHOSHGOGTAAR T M,CUKIC B,SELIYAN.An empirical assessment on program moduleorder models[J].Quality Technology&Quantitative Management,2007,4(2):171-190.
[14]ZIMMERMANN T,PREMRAJ R,ZELLER A.Predicting defects for eclipse[C].International Workshop on Predictor MODELS in Software Engineering,2007.Promise07:ICSE Workshops.IEEE,2007:9.
[15]PENG L,YANG B,CHEN Y,et al..Data gravitation based classification[J].Information Sciences An International Journal,2009,179(6):809-819.