计算机科学 ›› 2025, Vol. 52 ›› Issue (11A): 250200024-14.doi: 10.11896/jsjkx.250200024

• 计算机软件 • 上一篇    下一篇

自动化软件缺陷定位技术研究

房金秋, 贠国荣, 赵海勇, 谢皓萌   

  1. 聊城大学计算机学院 山东 聊城 252000
  • 出版日期:2025-11-15 发布日期:2025-11-10
  • 通讯作者: 赵海勇(zhaohaiyong@lcu-cs.com)
  • 作者简介:2022400825@stu.lcu.edu.cn
  • 基金资助:
    国家自然科学基金(62402202);山东省自然科学基金(ZR2024QF036);山东省本科教学改革研究项目(M2023218);2024年国家级大学生创新创业训练计划项目(202410447004)

Advances in Automatic Software Defect Location Techniques

FANG Jinqiu, YUN Guorong, ZHAO Haiyong, XIE Haomeng   

  1. College of Computer Science and Technology,Liaocheng University,Liaocheng,Shandong 252000,China
  • Online:2025-11-15 Published:2025-11-10
  • Supported by:
    National Natural Science Foundation of China(62402202),Natural Science Foundation of Shandong Province,China(ZR2024QF036),Shandong Province Undergraduate Teaching Reform Research Project(M2023218) and 2024 National College Students’ Innovation and Entrepreneurship Training Program Project(202410447004).

摘要: 软件缺陷定位已经成为软件调试领域重要的研究主题,自动化软件缺陷定位旨在提高缺陷定位的自动化程度,帮助开发人员更高效地定位大规模软件中可能存在缺陷的位置,以达到优化分配测试资源的目的。以自动化软件缺陷定位技术为核心,对相关研究成果进行系统梳理。首先,依据软件缺陷处理生命周期,给出了缺陷定位的一般性研究框架,总结了每一类代表性算法利用的缺陷信息,讨论了深度学习对相关算法的影响。其次,针对软件系统包含缺陷数量的不同,从单缺陷和多缺陷两个角度对比了相关算法。最后,给出了相关算法常用的评测数据集以及评价指标,指出了本领域研究面临的一些挑战,并展望了若干值得进一步研究的方向。

关键词: 缺陷定位, 缺陷检测, 软件工程, 软件质量, 深度学习

Abstract: Software defect localization has become an important research topic in the field of software debugging,and automated software defect localization aims to improve the degree of automation of defect location,help developers locate possible defects in large-scale software more efficiently,so as to achieve the purpose of optimal allocation of test resources.With the defect location technology of automatic software as the core,the relevant research results are systematically sorted out.Firstly,according to whether it is necessary to run test cases,the positioning technology is divided into static positioning technology and dynamic positioning technology,the representative algorithms of each type of technology are summarized,and the influence of deep learning on related algorithms is discussed.Secondly,according to the difference in the number of defects contained in the software system,the related algorithms are compared from the perspectives of single defect and multiple defects.Finally,the commonly used evaluation datasets and evaluation indicators of related algorithms are given,some challenges in this field are pointed out,and some directions worthy of further research are prospected.

Key words: Fault localization, Defect detection, Software engineering, Software quality, Deep learning

中图分类号: 

  • TP311
[1]LUCIA L,THUNG F,LO D,et al.Are faults localizable?[C]//Proceeding of the 2012 9th IEEE Working Conference on Mining Software Repositories(MSR).2012:74-77.
[2]ZHANG W,LI Z Q,DU Y H,et al.Fine-grained software bug location approach at method level[J].Journal of Software,2019,30(2):195-210.
[3]YU K,LIN M X.Advances in automatic fault localization techniques[J].Chinese Journal of Computers,2011,34(8):1411-1422.
[4]CHEN X,JU X L,WEN W Z,et al.Review of dynamic fault localization approaches based on program spectrum[J].Journal of Software,2015,26(2):390-412.
[5]GUO Z Q,ZHOU H C,LIU S R,et al.Information retrievalbased bug localization:Research problem,progress,and challenges[J].Journal of Software,2020,31(9):2826-2854.
[6]ZHANG Y,LIU J K,XIA X,et al.Research progress on software bug localization technology based on information retrieval[J].Ruan Jian Xue Bao:Journal of Software,2020,31(8):2432-2452.
[7]LI Z L,CHEN X,JIANG Z W,et al.Survey on information retrieval-based software bug localization methods[J].Ruan Jian Xue Bao:Journal of Software,2021,32(2):247-276.
[8]NI Z,LI B,SUN X B,et al.Research and Progress on Bug Report-oriented Bug Localization Techniques[J].Computer Science,2022,49(11):8-23.
[9]IEEE Std 1044-2009,IEEE Standard Classification for Software Anomalies[S].IEEE Standard Indus,2010:1-23.
[10]WEISER M D.Program slices:formal,psychological,and practical investigations of an automatic program abstraction method[M].University of Michigan,1979.
[11]WANG S,LO D.Amalgam+:Composing rich informationsources for accurate bug localization[J].Journal of Software:Evolution and Process,2016,28(10):921-942.
[12]SHI Z,KEUNG J,BENNIN K E,et al.Comparing learning torank techniques in hybrid bug localization[J].Applied Soft Computing,2018,62:636-648.
[13]YUE L,CUI Z Q,CHEN X,et al.Statement level software bug localization based on historical bug information retrieval[J].Journal of Software,2024,35(10):4642-4661.
[14]YANG Y,WANG Z,CHEN Z,et al.COPS:An improved information retrieval-based bug localization technique using context-aware program simplification[J].Journal of Systems and Software,2024,207:111868.
[15]RAHMAN M M,ROY C K.Improving ir-based bug localization with context-aware query reformulation[C]//Proceedings of the 2018 26th ACM Joint Meeting on European Software Engineering Conference and Symposium on the Foundations of Software Engineering.2018:621-632.
[16]KIM M,LEE E.A novel approach to automatic query reformula-tion for ir-based bug localization[C]//Proceedings of the 34th ACM/SIGAPP Symposium on Applied Computing.2019:1752-1759.
[17]GHARIBI R,RASEKH A H,SADREDDINI M H,et al.Leveraging textual properties of bug reports to localize relevant source files[J].Information Processing & Management,2018,54(6):1058-1076.
[18]YOUM K C,AHN J,LEE E.Improved bug localization based on code change histories and bug reports[J].Information and Software Technology,2017,82:177-192.
[19]WEN M,WU R,CHEUNG S C.Locus:Locating bugs fromsoftware changes[C]//Proceedings of the 31st IEEE/ACM International Conference on Automated Software Engineering.2016:262-273.
[20]ALMHANA R,MKAOUER W,KESSENTINI M,et al.Rec-ommending relevant classes for bug reports using multi-objective search[C]//Proceedings of the 31st IEEE/ACM International Conference on Automated Software Engineering.2016:286-295.
[21]YE X,BUNESCU R,LIU C.Mapping bug reports to relevantfiles:A ranking model,a fine-grained benchmark,and feature evaluation[J].IEEE Transactions on Software Engineering,2015,42(4):379-402.
[22]HOANG T,OENTARYO R J,LE T D B,et al.Network-clustered multi-modal bug localization[J].IEEE Transactions on Software Engineering,2018,45(10):1002-1023.
[23]RAHMAN S,GANGULY K K,SAKIB K.An improved bug localization using structured information retrieval and version history[C]//18th International Conference on Computer and Information Technology(ICCIT 2015).IEEE,2015:190-195.
[24]KOYUNCU A,BISSYANDÉ T F,KIM D,et al.D&c:A divide-and-conquer approach to ir-based bug localization[J].arXiv:1902.02703,2019.
[25]ZHANG W,LI Z,WANG Q,et al.FineLocator:A novel ap-proach to method-level fine-grained bug localization by query expansion[J].Information and Software Technology,2019,110:121-135.
[26]DILSHENER T,WERMELINGER M,YU Y.Locating bugswithout looking back[C]//Proceedings of the 13th International Conference on Mining Software Repositories.2016:286-290.
[27]RATH M,LO D,MÄDER P.Analyzing requirements and traceability information to improve bug localization[C]//Proceedings of the 15th International Conference on Mining Software Repositories.2018:442-453.
[28]SISMAN B,AKBAR S A,KAK A C.Exploiting spatial code proximity and order for improved source code retrieval for bug localization[J].Journal of Software:Evolution and Process,2017,29(1):e1805.
[29]LE T D B,OENTARYO R J,LO D.Information retrieval and spectrum based bug localization:Better together[C]//Proceedings of the 2015 10th Joint Meeting on Foundations of Software Engineering.2015:579-590.
[30]DAO T,ZHANG L,MENG N.How does execution information help with information-retrieval based bug localization?[C]//IEEE/ACM 25th International Conference on Program Comprehension(ICPC 2017).IEEE,2017:241-250.
[31]KUMAR D,SHARMA R.Bug Localization using LDACG Approach[J].International Journal of Engineering Research and Technology,2015(4).
[32]DE SOUZA H A,CHAIM M L,KON F.Spectrum-based software fault localization:A survey of techniques,advances,and challenges[J].arXiv:1607.04347,2016.
[33]SARHAN Q I,BESZÉDES Á.A survey of challenges in spectrum-based software fault localization[J].IEEE Access,2022,10:10618-10639.
[34]JONES J A,HARROLD M J,STASKO J.Visualization of test information to assist fault localization[C]//Proceedings of the 24th International Conference on Software Engineering.2002:467-477.
[35]JONES J A,HARROLD M J.Empirical evaluation of the tarantula automatic fault-localization technique[C]//Proceedings of the 20th IEEE/ACM international Conference on Automated Software Engineering.2005:273-282.
[36]ABREU R,ZOETEWEIJ P,VAN GEMUNDA J C.An evaluation of similarity coefficients for software fault localization[C]//2006 12th Pacific Rim International Symposium on Dependable Computing(PRDC’06).IEEE,2006:39-46.
[37]ABREU R,ZOETEWEIJ P,VAN GEMUND A J C.On the accuracy of spectrum-based fault localization[C]//Testing:Academic and Industrial Conference Practice and Research Techniques-MUTATION(TAICPART-MUTATION 2007).IEEE,2007:89-98.
[38]RENIERES M,REISS S P.Fault localization with nearestneighbor queries[C]//18th IEEE International Conference on Automated Software Engineering,IEEE,2003:30-39.
[39]NAISH L,RAMAMOHANARAO K.Multiple bug spectralfault localization using genetic programming[C]//2015 24th Australasian Software Engineering Conference.IEEE,2015:11-17.
[40]WONG W E,QI Y.BP neural network-based effective fault localization[J].International Journal of Software Engineering and Knowledge Engineering,2009,19(4):573-597.
[41]LI Z,CUI Z Q,CHEN X,et al.Deep-SBFL:Spectrum-basedfault localization approach for deep neural networks[J].Journal of Software,2023,34(5):2231-2250.
[42]JIA Y,HARMAN M.An analysis and survey of the development of mutation testing[J].IEEE Transactions on Software Engineering,2010,37(5):649-678.
[43]MOON S,KIM Y,KIM M,et al.Ask the mutants:Mutatingfaulty programs for fault localization[C]//2014 IEEE Seventh International Conference on Software Testing,Verification and Validation.IEEE,2014:153-162.
[44]PAPADAKIS M,LE TRAON Y.Metallaxis-FL:mutation-based fault localization[J].Software Testing,Verification and Reliability,2015,25(5/6/7):605-628.
[45]HONG S,LEE B,KWAK T,et al.Mutation-based fault localization for real-world multilingual programs(T)[C]//30th IEEE/ACM International Conference on Automated Software Engineering(ASE 2015).IEEE,2015:464-475.
[46]LIU Y,LI Z,WANG L,et al.Statement-oriented mutant reduction strategy for mutation based fault localization[C]//IEEE International Conference on Software Quality,Reliability and Security(QRS 2017).IEEE,2017:126-137.
[47]LIU Y,LI Z,ZHAO R,et al.An optimal mutation executionstrategy for cost reduction of mutation-based fault localization[J].Information Sciences,2018,422:572-596.
[48]DE OLIVEIRA AA L,CAMILO-JUNIOR C G,DE ANDRADE FREITAS E N,et al.Ftmes:A failed-test-oriented mutant execution strategy for mutation-based fault localization[C]//IEEE 29th International Symposium on Software Reliability Engineering(ISSRE 2018).IEEE,2018:155-165.
[49]KIM J,AN G,FELDT R,et al.Ahead of time mutation based fault localisation using statistical inference[C]//IEEE 32nd International Symposium on Software Reliability Engineering(ISSRE 2021).IEEE,2021:253-263.
[50]LI X,JUZA R.Accelerating Mutation-Based Fault Localization via Optimized Mutant Execution[C]//13th International Conference on Software Technology and Engineering(ICSTE 2023).IEEE,2023:82-86.
[51]JEON J,HONG S.Improving mutation-based fault localization with plausible-code generating mutation operators[C]//36th IEEE/ACM International Conference on Automated Software Engineering(ASE 2021).IEEE,2021:1205-1207.
[52]GHANBARI A,THOMAS D G,ARSHAD M A,et al.Muta-tion-based Fault Localization of Deep Neural Networks[C]//38th IEEE/ACM International Conference on Automated Software Engineering(ASE 2023).IEEE,2023:1301-1313.
[53]ZHANG X,GUPTA N,GUPTA R.Locating faulty code bymultiple points slicing[J].Software:Practice and Experience,2007,37(9):935-961.
[54]ZHANG X,GUPTA R,ZHANG Y.Precise dynamic slicing algorithms[C]//25th International Conference on Software Engineering,2003.Proceedings.IEEE,2003:319-329.
[55]ZHANG X,GUPTA N,GUPTA R.Locating faults through automated predicate switching[C]//Proceedings of the 28th International Conference on Software Engineering.2006:272-281.
[56]SOREMEKUN E,KIRSCHNER L,BÖHME M,et al.Locating faults with program slicing:an empirical analysis[J].Empirical Software Engineering,2021,26:1-45.
[57]SOHA P A.On The Efficiency of Combination of Program Slicing and Spectrum-Based Fault Localization[C]//IEEE Conference on Software Testing,Verification and Validation(ICST 2023).IEEE,2023:499-501.
[58]WONG W E,GAO R,LI Y,et al.A survey on software fault localization[J].IEEE Transactions on Software Engineering,2016,42(8):707-740.
[59]ZHANG Z,JIANG B,CHAN W K,et al.Fault localizationthrough evaluation sequences[J].Journal of Systems and Software,2010,83(2):174-187.
[60]YU Y,JONES J A,HARROLD M J.An empirical study of the effects of test-suite reduction on fault localization[C]//Proceedings of the 30th International Conference on Software Engineering.2008:201-210.
[61]HARROLD M J,ROTHERMEL G,SAYRE K,et al.An empirical investigation of the relationship between spectra differences and regression faults[J].Software Testing,Verification and Reliability,2000,10(3):171-194.
[62]NAISH L,LEE H J,RAMAMOHANARAO K.A model forspectra-based software diagnosis[J].ACM Transactions on Software Engineering and Methodology(TOSEM),2011,20(3):1-32.
[63]XIE X,CHEN T Y,KUOF C,et al.A theoretical analysis of the risk evaluation formulas for spectrum-based fault localization[J].ACM Transactions on Software Engineering and Methodology(TOSEM),2013,22(4):1-40.
[64]WONGW E,DEBROY V,GAO R,et al.The DStar method for effective software fault localization[J].IEEE Transactions on Reliability,2013,63(1):290-308.
[65]LOU Y,ZHU Q,DONG J,et al.Boosting coverage-based fault localization via graph-based representation learning[C]//Proceedings of the 29th ACM Joint Meeting on European Software Engineering Conference and Symposium on the Foundations of Software Engineering.2021:664-676.
[66]REITER R.A theory of diagnosis from first principles[J].Artificial intelligence,1987,32(1):57-95.
[67]DEMILLO R A,PAN H,SPAFFORDE H.Failure and faultanalysis for software debugging[C]//Proceedings Twenty-First Annual International Computer Software and Applications Conference(COMPSAC’97).IEEE,1997:515-521.
[68]CLEVE H,ZELLER A.Locating causes of program failures[C]//Proceedings of the 27th International Conference on Software Engineering.2005:342-351.
[69]JU X,QIAN J,CHEN Z,et al.Mulr4FL:effective fault localization of evolution software based on multivariate logistic regression model[J].IEEE Access,2020,8:207858-207870.
[70]REN S B,CHEN J,TAN W Z,et al.Probabilistic model checking method for software fault location[J].Application Research of Computers,2021,38(11):3387-3392,3397.
[71]DENMAT T,DUCASSÉ M,RIDOU O.Data mining and cross-checking of execution traces:a re-interpretation of jones,harrold and stasko test information[C]//Proceedings of the 20th IEEE/ACM International Conference on Automated Software Engineering.2005:396-399.
[72]WONG W E,DEBROY V,GOLDEN R,et al.Effective software fault localization using an RBF neural network[J].IEEE Transactions on Reliability,2011,61(1):149-169.
[73]CELLIER P,DUCASSÉ M,FERRÉ S,et al.Multiple Fault Localization with Data Mining[C]//SEKE.2011:238-243.
[74]ZHANG S,ZHANG C.Software bug localization with markov logic[C]//Companion Proceedings of the 36th International Conference on Software Engineering.2014:424-427.
[75]POLISETTY S,MIRANSKYY A,BAŞAR A.On usefulness of the deep-learning-based bug localization models to practitioners[C]//Proceedings of the Fifteenth International Conference on Predictive Models and Data Analytics in Software Engineering.2019:16-25.
[76]LAM A N,NGUYEN A T,NGUYEN H A,et al.Bug localization with combination of deep learning and information retrieval[C]//IEEE/ACM 25th International Conference on Program Comprehension(ICPC 2017).IEEE,2017:218-229.
[77]XIAO Y,KEUNG J,MI Q,et al.Improving bug localizationwith an enhanced convolutional neural network[C]//24th Asia-Pacific Software Engineering Conference(APSEC 2017).IEEE,2017:338-347.
[78]XIAO Y,KEUNG J,BENNIN K E,et al.Improving bug localization with word embedding and enhanced convolutional neural networks[J].Information and Software Technology,2019,105:17-29.
[79]QI B,SUN H,YUAN W,et al.DreamLoc:A deep relevancematching-based framework for bug localization[J].IEEE Transactions on Reliability,2021,71(1):235-249.
[80]SONG L H,HAN Y.Deep_FGDL:A Fine-grained Defect Localization Method Based on Deep Neural Network[J].Journal of North China University of Technology,2024,36(1):1-11.
[81]SHEN Z W,NIU F F,LI C Y,et al.Software bug location method combining information retrieval and deep model features[J].Journal of Software,2024,35(7):3245-3264.
[82]LI Z,WU Y H,WANG H F,et al.Review of software multiplefault localization approaches[J].Chinese Journal of Computers,2022,45(2):256-288.
[83]WANG Z,FAN X Y,ZOU Y G,et al.Genetic Algorithm BasedMultiple Faults Localization Technique[J].Journal of Software,2016,27(4):879-900.
[84]ZHENG Y,WANG Z,FAN X,et al.Localizing multiple software faults based on evolution algorithm[J].Journal of Systems and Software,2018,139:107-123.
[85]CAO H,WANG F,DENG M,et al.Multiple fault localization based on ant colony algorithm via genetic operation[J].Journal of King Saud University-Computer and Information Sciences,2023,35(8):101668.
[86]DO H,ELBAUM S,ROTHERMEL G.Supporting controlledexperimentation with testing techniques:An infrastructure and its potential impact[J].Empirical Software Engineering,2005,10:405-435.
[87]YU K,LIN M,GAO Q,et al.Locating faults using multiplespectra-specific models[C]//Proceedings of the 2011 ACM Symposium on Applied Computing.2011:1404-1410.
[88]JEFFREY D,GUPTA N,GUPTA R.Fault localization usingvalue replacement[C]//Proceedings of the 2008 International Symposium on Software Testing and Analysis.2008:167-178.
[89]NESSA S,ABEDIN M,WONGW E,et al.Software fault localization using n-gram analysis[C]//Wireless Algorithms,Systems,and Applications:Third International Conference(WASA 2008).Dallas,TX,USA.Springer Berlin Heidelberg,2008:548-559.
[90]HUTCHINS M,FOSTER H,GORADIA T,et al.Experimentson the effectiveness of dataflow-and control-flow-based test adequacy criteria[C]//Proceedings of 16th International Conference on Software Engineering.IEEE,1994:191-200.
[91]HARDER M,MELLEN J,ERNST M D.Improving test suites via operational abstraction[C]//25th International Conference on Software Engineering.IEEE,2003:60-71.
[92]WEN M,CHEN J,TIAN Y,et al.Historical spectrum based fault localization[J].IEEE Transactions on Software Engineering,2019,47(11):2348-2368.
[93]ZOU D,LIANG J,XIONG Y,et al.An empirical study of fault localization families and their combinations[J].IEEE Transactions on Software Engineering,2019,47(2):332-347.
[94]MENG X,WANG X,ZHANG H,et al.Improving fault localization and program repair with deep semantic features and transferred knowledge[C]//Proceedings of the 44th International Conference on Software Engineering.2022:1169-1180.
[95]ZENG M,WU Y,YE Z,et al.Fault localization via efficientprobabilistic modeling of program semantics[C]//Proceedings of the 44th International Conference on Software Engineering.2022:958-969.
[96]JUST R,JALALI D,ERNST M D.Defects4J:A database ofexisting faults to enable controlled testing studies for Java programs[C]//Proceedings of the 2014 International Symposium on Software Testing and Analysis.2014:437-440.
[97]KOCHHAR P S,XIA X,LO D,et al.Practitioners’ expectations on automated fault localization[C]//Proceedings of the 25th International Symposium on Software Testing and Analysis.2016:165-176.
[98]LIU C,FEI L,YAN X,et al.Statistical debugging:A hypothesis testing-based approach[J].IEEE Transactions on Software Engineering,2006,32(10):831-848.
[99]WONG E,WEI T,QI Y,et al.A crosstab-based statisticalmethod for effective fault localization[C]//2008 1st Internatio-nal Conference on Software Testing,Verification,and Validation.IEEE,2008:42-51.
[100]PENG Z,XIAO X,HU G,et al.ABFL:an autoencoder basedpractical approach for software fault localization[J].Information Sciences,2020,510:108-121.
[101]LEE J,KIM D,BISSYANDÉ T F,et al.Bench4bl:reproducibility study on the performance of ir-based bug localization[C]//Proceedings of the 27th ACM SIGSOFT International Symposium on Software Testing and Analysis.2018:61-72.
[102]WIDYASARI R,PRANA G A A,HARYONO S A,et al.Real world projects,real faults:evaluating spectrum based fault localization techniques on Python projects[J].Empirical Software Engineering,2022,27(6):147.
[103]REZAALIPOUR M,FURIA C A.An empirical study of fault localization in Python programs[J].Empirical Software Engineering,2024,29(4):92.
[104]JIANG J,WANG Y,CHEN J,et al.Variable-Based Fault Localization via Enhanced Decision Tree[J].ACM Transactions on Software Engineering and Methodology,2023,33(2):1-32.
[105]YOUSOFVAND L,SOLEIMANI S,RAFE V.Automatic buglocalization using a combination of deep learning and model transformation through node classification[J].Software Quality Journal,2023,31(4):1045-1063.
[106]HAN J,HUANG C,SUN S,et al.bjXnet:an improved bug localization model based on code property graph and attention mechanism[J].Automated Software Engineering,2023,30(1):12.
[107]QIAN J,JU X,CHEN X.GNet4FL:effective fault localization via graph convolutional neural network[J].Automated Software Engineering,2023,30(2):16.
[108]CAO J,LI M,CHEN X,et al.Deepfd:Automated fault diagnosis and localization for deep learning programs[C]//Proceedings of the 44th International Conference on Software Engineering.2022:573-585.
Viewed
Full text


Abstract

Cited

  Shared   
  Discussed   
No Suggested Reading articles found!