Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
research-article

Improving fault localization via weighted execution graph and graph attention network

Published: 05 October 2023 Publication History

Abstract

Software fault localization is commonly recognized as arduous and time consuming. Spectrum‐based fault localization (SBFL) has been widely used due to its lightness. However, the effectiveness of SBFL is limited since it only considers simple statistics on the coverage information, ignoring the tie problem that the spectrum matrixes of some statements are the same. Most existing deep learning‐based fault localization (DLFL) techniques convert the coverage information into a vector, which utilizes the spectrum in a simplified manner and still has limitations in practice. To solve the above problem, we propose an approach via the weighted execution graph and graph attention network (WEGAT). We use a graph structure to represent the coverage information between test cases and program elements. Then, we generate a weighted execution graph by applying the predicate execution sequence. Furthermore, we combine the weighted execution graph with the AST as an integrated graph, which is the input of the GAT for fault localization. We evaluate WEGAT in within‐project and cross‐project prediction scenarios on the Defects4J benchmark. Experimental results show that our approach outperforms traditional SBFL (Ochiai, DStar and Tarantula) and DLFL (TraPT, CNN‐FL, Grace, and AGFL) methods, effectively improving the accuracy of fault localization.

Graphical Abstract

Firstly, we model the coverage information of programs as execution graphs and use predicate sequences to construct the weighted execution graph. Furthermore, we combine the weighted execution graph with AST to generate an integrated graph. Finally, we apply the GAT model to mine the Integrated graph's valuable features fully.

References

[1]
Parnin C, Orso A. Are automated debugging techniques actually helping programmers? In: Proceedings of the 2011 International Symposium on Software Testing and Analysis. Association for Computing Machinery; 2011:199‐209.
[2]
Vessey I. Expertise in debugging computer programs: A process analysis. Int J Man‐Machine Stud. 1985;23(5):459‐494. https://www.sciencedirect.com/science/article/pii/S0020737385800547
[3]
Jones JA, Harrold MJ. Empirical evaluation of the tarantula automatic fault‐localization technique. In: 20th IEEE/ACM International Conference on Automated Software Engineering (ASE 2005). ACM; 2005:273‐282.
[4]
Guo Z, Zhou H, Liu S, et al. Information retrieval based bug localization: research problem, progress, and challenges. J Softw. 2020;31(9):2826‐2854.
[5]
Zhang Z, Lei Y, Mao X, Li P. CNN‐FL: an effective approach for localizing faults using convolutional neural networks. In: 2019 IEEE 26th International Conference on Software Analysis, Evolution and Reengineering (SANER). IEEE; 2019:445‐455.
[6]
Li X, Li W, Zhang Y, Zhang L. DeepFL: integrating multiple fault diagnosis dimensions for deep fault localization. In: Proceedings of the 28th ACM SIGSOFT International Symposium on Software Testing and Analysis. ACM; 2019:169‐180.
[7]
Moon S, Kim Y, Kim M, Yoo S. Ask the mutants: mutating faulty programs for fault localization. In: 2014 IEEE Seventh International Conference on Software Testing, Verification and Validation. IEEE; 2014:153‐162.
[8]
Abreu R, Zoeteweij P, Van Gemund AJC. An evaluation of similarity coefficients for software fault localization. In: 12th IEEE Pacific Rim International Symposium on Dependable Computing (PRDC 2006). IEEE Computer Society; 2006.
[9]
Wong WE, Debroy V, Li Y, Gao R. Software fault localization using dstar (d*). In: 2012 IEEE Sixth International Conference on Software Security and Reliability. IEEE; 2012:21‐30.
[10]
Wong WE, Gao R, Li Y, Abreu R, Wotawa F. A survey on software fault localization. IEEE Trans Softw Eng. 2016;42(8):707‐740.
[11]
Lou Y, Zhu Q, Dong J, et al. Boosting coverage‐based fault localization via graph‐based representation learning. In: ESEC/FSE 2021. Association for Computing Machinery; 2021:664‐676.
[12]
Veličković P, Cucurull G, Casanova A, Romero A, Liò P, Bengio Y. Graph attention networks. In: International Conference on Learning Representations. OpenReview.net; 2018. https://openreview.net/forum?id=rJXMpikCZ
[13]
Zhou W, Xia Z, Dou P, Su T, Hu H. Double attention based on graph attention network for image multi‐label classifications. ACM Trans Multimedia Comput Commun Appl. 2023;19(1):1‐23.
[14]
Mousavian Z, Vahidi‐Asl M, Parsa S. Scalable graph analyzing approach for software fault‐localization. In: Proceedings of the 6th International Workshop on Automation of Software Test. Association for Computing Machinery; 2011:15‐21.
[15]
Baxter ID, Yahin A, Moura L, Sant'Anna M, Bier L. Clone detection using abstract syntax trees. In: 1998 International Conference on Software Maintenance, ICSM 1998. IEEE Computer Society; 1998:368‐377.
[16]
Li X, Zhang L. Transforming programs and tests in tandem for fault localization. Proc ACM Programm Lang. 2017;1(OOPSLA):1‐30.
[17]
Qian J, Ju X, Chen X, Shen H, Shen Y. AGFL: a graph convolutional neural network‐based method for fault localization. In: 2021 IEEE 21st International Conference on Software Quality, Reliability and Security (QRS). IEEE; 2021:672‐680.
[18]
Rene J, Jalali D, Ernst MD. Defects4J: a database of existing faults to enable controlled testing studies for java programs. In: International Symposium on Software Testing and Analysis, ISSTA '14. ACM; 2014:437‐440.
[19]
Mou L, Li G, Zhang L, Wang T, Jin Z. Convolutional neural networks over tree structures for programming language processing. In: Proceedings of the Thirtieth AAAI Conference on Artificial Intelligence, 2016. AAAI Press; 2016:1287‐1293. http://www.aaai.org/ocs/index.php/AAAI/AAAI16/paper/view/11775
[20]
Weimer W, Nguyen T, Le Goues C, Forrest S. Automatically finding patches using genetic programming. In: 2009 IEEE 31st International Conference on Software Engineering. IEEE; 2009:364‐374.
[21]
Zhao Z, Yang B, Li G, Liu H, Jin Z. Precise learning of source code contextual semantics via hierarchical dependence structure and graph attention networks. J Syst Softw. 2022;184:111108. https://www.sciencedirect.com/science/article/pii/S0164121221002053
[22]
Zhang J, Wang X, Zhang H, Sun H, Wang K, Liu X. A novel neural source code representation based on abstract syntax tree. In: 2019 IEEE/ACM 41st International Conference on Software Engineering (ICSE). IEEE / ACM; 2019:783‐794.
[23]
Hamilton W, Ying Z, Leskovec J. Inductive representation learning on large graphs. In: Advances in Neural Information Processing Systems 30: Annual Conference on Neural Information Processing Systems 2017. Curran Associates, Inc.; 2017.
[24]
Fout A, Byrd J, Shariat B, Ben‐Hur A. Protein interface prediction using graph convolutional networks. In: Advances in Neural Information Processing Systems 30: Annual Conference on Neural Information Processing Systems 2017. Curran Associates, Inc.; 2017.
[25]
Scarselli F, Gori M, Tsoi AC, Hagenbuchner M, Monfardini G. The graph neural network model. IEEE Trans Neural Netw. 2009;20(1):61‐80.
[26]
Denton EL, Zaremba W, Bruna J, LeCun Y, Fergus R. Exploiting linear structure within convolutional networks for efficient evaluation. In: Advances in Neural Information Processing Systems 27: Annual Conference on Neural Information Processing Systems 2014. Curran Associates, Inc.; 2014.
[27]
Choi J. Personalized pagerank graph attention networks. In: IEEE International Conference on Acoustics, Speech and Signal Processing, ICASSP 2022. IEEE; 2022:3578‐3582.
[29]
Xie Z, Zheng G, Miao L, Huang W. STGL‐GCN: spatial‐temporal mixing of global and local self‐attention graph convolutional networks for human action recognition. IEEE Access. 2023;11:16526‐16532.
[30]
Xie X, Chen TY, Kuo F, Xu B. A theoretical analysis of the risk evaluation formulas for spectrum‐based fault localization. ACM Trans Softw Eng Methodol. 2013;22(4):1‐40.
[31]
Lou Y, Ghanbari A, Li X, et al. Can automated program repair refine fault localization? A unified debugging approach. In: ISSTA 2020. Association for Computing Machinery; 2020:75‐87.
[32]
Xie H, Lei Y, Yan M, Yu Y, Xia X, Mao X. A universal data augmentation approach for fault localization. In: Proceedings of the 44th International Conference on Software Engineering, ICSE '22. Association for Computing Machinery; 2022:48‐60.
[33]
Luo L, Piskachev G, Krishnamurthy R, Dolby J, Bodden E, Schäf M. Model generation for java frameworks. In: Proceeding of the 2023 IEEE Conference on Software Testing, Verification and Validation (ICST); 2023:165‐175.
[35]
Mikolov T, Sutskever I, Chen K, Corrado GS, Dean J. Distributed representations of words and phrases and their compositionality. In: Advances in Neural Information Processing Systems 26: 27th Annual Conference on Neural Information Processing Systems 2013; 2013:3111‐3119.
[36]
[37]
Yan Y. The source code and steps of WeGAT. https://github.com/Yue332/WEGAT/
[38]
Xie X, Liu Z, Song S, Chen Z, Xuan J, Xu B. Revisit of automatic debugging via human focus‐tracking analysis. In: Proceedings of the 38th International Conference on Software Engineering, ICSE '16. Association for Computing Machinery; 2016:808‐819.
[39]
Huo X, Thung F, Li M, Lo D, Shi S‐T. Deep transfer bug localization. IEEE Trans Softw Eng. 2021;47(7):1368‐1380.
[40]
Zhang Z, Lei Y, Mao X, Yan M, Xu L, Wen J. Improving deep‐learning‐based fault localization with resampling. J Softw: Evol Process. 2021;33(3):e2312. https://onlinelibrary.wiley.com/doi/abs/10.1002/smr.2312

Recommendations

Comments

Information & Contributors

Information

Published In

cover image Journal of Software: Evolution and Process
Journal of Software: Evolution and Process  Volume 36, Issue 6
June 2024
438 pages
EISSN:2047-7481
DOI:10.1002/smr.v36.6
Issue’s Table of Contents

Publisher

John Wiley & Sons, Inc.

United States

Publication History

Published: 05 October 2023

Author Tags

  1. deep learning
  2. fault localization
  3. software debugging
  4. spectrum‐based

Qualifiers

  • Research-article

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • 0
    Total Citations
  • 0
    Total Downloads
  • Downloads (Last 12 months)0
  • Downloads (Last 6 weeks)0
Reflects downloads up to 17 Oct 2024

Other Metrics

Citations

View Options

View options

Get Access

Login options

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media