NPEX: Repairing Java']Java Null Pointer Exceptions without Tests

被引:7
作者
Lee, Junhee [1 ]
Hong, Seongjoon [1 ]
Oh, Hakjoo [1 ]
机构
[1] Korea Univ, Seoul, South Korea
来源
2022 ACM/IEEE 44TH INTERNATIONAL CONFERENCE ON SOFTWARE ENGINEERING (ICSE 2022) | 2022年
基金
新加坡国家研究基金会;
关键词
CODE;
D O I
10.1145/3510003.3510186
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
We present NPEX, a new technique for repairing Java null pointer exceptions (NPEs) without tests. State-of-the-art NPE repair techniques rely on test suites written by developers for patch validation. Unfortunately, however, those are typically future test cases that are unavailable at the time bugs are reported or insufficient to identify correct patches. Unlike existing techniques, NPEX does not require test cases; instead, NPEX automatically infers the repair specification of the buggy program and uses the inferred specification to validate patches. The key idea is to learn a statistical model that predicts how developers would handle NPEs by mining null-handling patterns from existing codebases, and to use a variant of symbolic execution that can infer the repair specification from the buggy program using the model. We evaluated NPEX on real-world NPEs collected from diverse open-source projects. The results show that NPEX significantly outperforms the current state-of-the-art.
引用
收藏
页码:1532 / 1544
页数:13
相关论文
共 70 条
  • [1] Repairing Event Race Errors by Controlling Nondeterminism
    Adamsen, Christoffer Quist
    Moller, Anders
    Karim, Rezwana
    Sridharan, Manu
    Tip, Frank
    Sen, Koushik
    [J]. 2017 IEEE/ACM 39TH INTERNATIONAL CONFERENCE ON SOFTWARE ENGINEERING (ICSE), 2017, : 289 - 299
  • [2] Andrews Nick., WE CRUNCHED 1 BILLIO
  • [3] Impact Analysis of Syntactic and Semantic Similarities on Patch Prioritization in Automated Program Repair
    Asad, Moumita
    Ganguly, Kishan Kumar
    Sakib, Kazi
    [J]. 2019 IEEE INTERNATIONAL CONFERENCE ON SOFTWARE MAINTENANCE AND EVOLUTION (ICSME 2019), 2019, : 328 - 332
  • [4] Getafix: Learning to Fix Bugs Automatically
    Bader, Johannes
    Scott, Andrew
    Pradel, Michael
    Chandra, Satish
    [J]. PROCEEDINGS OF THE ACM ON PROGRAMMING LANGUAGES-PACMPL, 2019, 3 (OOPSLA):
  • [5] EnergyPatch: Repairing Resource Leaks to Improve Energy-Efficiency of Android Apps
    Banerjee, Abhijeet
    Chong, Lee Kee
    Ballabriga, Clement
    Roychoudhury, Abhik
    [J]. IEEE TRANSACTIONS ON SOFTWARE ENGINEERING, 2018, 44 (05) : 470 - 490
  • [6] NULLAWAY: Practical Type-Based Null Safety for Java']Java
    Banerjee, Subarno
    Clapp, Lazaro
    Sridharan, Manu
    [J]. ESEC/FSE'2019: PROCEEDINGS OF THE 2019 27TH ACM JOINT MEETING ON EUROPEAN SOFTWARE ENGINEERING CONFERENCE AND SYMPOSIUM ON THE FOUNDATIONS OF SOFTWARE ENGINEERING, 2019, : 740 - 750
  • [7] Cheng X, 2017, IEEE INT CONF AUTOM, P996, DOI 10.1109/ASE.2017.8115718
  • [8] Cielecki Maciej., 2006, Proceedings of the 4th International Symposium on Principles and Practice of Programming in Java (PPPJ), P135
  • [9] Unveiling Exception Handling Bug Hazards in Android based on GitHub and Google Code Issues
    Coelho, Roberta
    Almeida, Lucas
    Gousios, Georgios
    van Deursen, Arie
    [J]. 12TH WORKING CONFERENCE ON MINING SOFTWARE REPOSITORIES (MSR 2015), 2015, : 134 - 145
  • [10] Dinella Elizabeth, 2020, ICLR