Dynamic Patch Generation for Null Pointer Exceptions Using Metaprogramming

Proceedings of the 25th IEEE International Conference on Software Analysis, Evolution and Reengineering, Main track (SANER'17)

T. DurieuxB. CornuL. SeinturierM. Monperrus 

PDFDOISlideSource codeExperiment Results

Abstract

Null pointer exceptions (NPE) are the number one cause of uncaught crashing exceptions in production. In this paper, we aim at exploring the search space of possible patches for null pointer exceptions with metaprogramming. Our idea is to transform the program under repair with automated code transformation, so as to obtain a metaprogram. This metaprogram contains automatically injected hooks, that can be activated to emulate a null pointer exception patch. This enables us to perform a fine-grain analysis of the runtime context of null pointer exceptions. We set up an experiment with 16 real null pointer exceptions that have happened in the field. We compare the effectiveness of our metaprogramming approach against simple templates for repairing null pointer exceptions.

@inproceedings{durieux2017dynamic,
author = {Durieux, Thomas and Cornu, Benoit and Seinturier, Lionel and Monperrus, Martin},
booktitle = {Proceedings of the 24th International Conference on Software Analysis, Evolution and Reengineering (SANER)},
organization = {IEEE},
pages = {349--358},
title = {Dynamic patch generation for null pointer exceptions using metaprogramming},
year = {2017}
}
1
2
3
4
5
6
7
8
Last Updated: 24/05/2022