Automatic Repair for Null Pointer References Guided by Abstract Semantics
CSTR:
Author:
  • Article
  • | |
  • Metrics
  • |
  • Reference [19]
  • |
  • Related [20]
  • | | |
  • Comments
    Abstract:

    Program dependency graph usually judges the data dependency according to definition-use relationships of variables in statements, and it cannot make an accurate judgment according to the semantics, which leads to the introduction of false dependency relationships and the repair failure caused by the use of error information in repairing defects. Therefore, this study will prune false dependencies related to null objects or null pointers by using abstract attributes and propose an abstract semantic-based program dependency graph to reduce the analysis of dependency relationships unrelated to the semantics of program defects and repair null pointer references. Based on the dependency relationships obtained from the analysis, a multi-strategies repair scheme is implemented under the guidance of different repair strategies for null pointer references, and the null pointer references are repaired with side effects minimized as much as possible. In addition, in this study, the null pointer references in Defects4J are adopted to evaluate the repair tool DTSFix through experiments. The results show that the repair effect of DTSFix is much better than that of other tools, which proves the effectiveness of the method.

    Reference
    [1] Ye H, Martinez M, Durieux T, et al. A comprehensive study of automatic program repair on the QuixBugs benchmark. Journal of Systems and Software, 2021, 171:110825.[doi:10.1016/j.jss.2020.110825
    [2] Klieber W, Martins R, Steele R, et al. Automated code repair to ensure spatial memory safety. Proceedings of the 2021 IEEE/ACM International Workshop on Automated Program Repair (APR). Madrid:IEEE, 2021. 23-30.
    [3] Campos D, Restivo A, Ferreira HS, et al. Automatic program repair as semantic suggestions:An empirical study. Proceedings of the 2021 14th IEEE Conference on Software Testing, Verification and Validation (ICST). Porto de Galinhas:IEEE, 2021. 217-228.
    [4] 李斌, 贺也平, 马恒太. 程序自动修复:关键问题及技术. 软件学报, 2019, 30(2):244-265.[doi:10.13328/j.cnki.jos.005657
    [5] Villanueva OM, Trujillo L, Hernandez DE. Novelty search for automatic bug repair. Proceedings of the 2020 Genetic and Evolutionary Computation Conference. Cancún:Association for Computing Machinery, 2020. 1021-1028.
    [6] White M, Tufano M, Martínez M, et al. Sorting and transforming program repair ingredients via deep learning code similarities. Proceedings of the 2019 IEEE 26th International Conference on Software Analysis, Evolution and Reengineering (SANER). Hangzhou:IEEE, 2019. 479-490.
    [7] Liu K, Koyuncu A, Kim D, et al. TBar:Revisiting template-based automated program repair. Proceedings of the 28th ACM SIGSOFT International Symposium on Software Testing and Analysis. Beijing:Association for Computing Machinery, 2019. 31-42.
    [8] Afzal A, Motwani M, Stolee KT, et al. SOSRepair:Expressive semantic search for real-world program repair. IEEE Transactions on Software Engineering, 2021, 47(10):2162-2181.[doi:10.1109/TSE.2019.2944914
    [9] Kanemitsu T, Higo Y, Kusumoto S. A visualization method of program dependency graph for identifying extract method opportunity. Proceedings of the 4th Workshop on Refactoring Tools. Waikiki:Association for Computing Machinery, 2011. 8-14.
    [10] Agarwal S, Agrawal AP. An empirical study of control dependency and data dependency for large software systems. Proceedings of the 2014 5th International Conference-Confluence The Next Generation Information Technology Summit (Confluence). Noida:IEEE, 2014. 877-879.
    [11] Noda K, Yokoyama H, Kikuchi S. Sirius:Static program repair with dependence graph-based systematic edit patterns. Proceedings of the 2021 IEEE International Conference on Software Maintenance and Evolution (ICSME). Luxembourg:IEEE, 2021. 437-447.
    [12] Halder R, Cortesi A. Abstract program slicing on dependence condition graphs. Science of Computer Programming, 2013, 78(9):1240-1263.[doi:10.1016/j.scico.2012.05.007
    [13] Sukumaran S, Sreenivas A, Metta R. The dependence condition graph:Precise conditions for dependence between program points. Computer Languages, Systems & Structures, 2010, 36(1):96-121.[doi:10.1016/j.cl.2009.04.001
    [14] Dong YK, Wu M, Zhang L, et al. Priority measurement of patches for program repair based on semantic distance. Symmetry, 2020, 12(12):2102.[doi:10.3390/sym12122102
    [15] D'Antoni L, Samanta R, Singh R. QLOSE:Program repair with quantitative objectives. Proceedings of the 28th International Conference on Computer Aided Verification. Toronto:Springer, 2016. 383-401.
    [16] Liu K, Kim D, Bissyandé TF, et al. Mining fix patterns for FindBugs violations. IEEE Transactions on Software Engineering, 2021, 47(1):165-188.[doi:10.1109/TSE.2018.2884955
    [17] Martinez M, Durieux T, Sommerard R, et al. Automatic repair of real bugs in Java:A large-scale experiment on the Defects4J dataset. Empirical Software Engineering, 2017, 22(4):1936-1964.[doi:10.1007/s10664-016-9470-4
    [18] Cornu B, Durieux T, Seinturier L, et al. NPEFix:Automatic runtime repair of null pointer exceptions in Java. arXiv:1512.07423, 2015.
    [19] 王淑栋, 尹文静, 董玉坤, 等. 面向顺序存储结构的数据流分析. 软件学报, 2020, 31(5):1276-1293.[doi:10.13328/j.cnki.jos.005949
    Cited by
    Comments
    Comments
    分享到微博
    Submit
Get Citation

王珣,孙玉雪,董玉坤,位欣欣,唐道龙.抽象语义引导的空指针引用自动修复.计算机系统应用,2023,32(1):376-384

Copy
Share
Article Metrics
  • Abstract:574
  • PDF: 1719
  • HTML: 1482
  • Cited by: 0
History
  • Received:May 11,2022
  • Revised:June 15,2022
  • Online: August 24,2022
Article QR Code
You are the first990366Visitors
Copyright: Institute of Software, Chinese Academy of Sciences Beijing ICP No. 05046678-3
Address:4# South Fourth Street, Zhongguancun,Haidian, Beijing,Postal Code:100190
Phone:010-62661041 Fax: Email:csa (a) iscas.ac.cn
Technical Support:Beijing Qinyun Technology Development Co., Ltd.

Beijing Public Network Security No. 11040202500063