[go: up one dir, main page]
More Web Proxy on the site http://driver.im/ skip to main content
10.1109/ISSRE.2008.59guideproceedingsArticle/Chapter ViewAbstractPublication PagesConference Proceedingsacm-pubtype
Article

Changing Java's Semantics for Handling Null Pointer Exceptions

Published: 10 November 2008 Publication History

Abstract

We envision a world where no exceptions are raised; instead, language semantics are changed so that operations are total functions. Either an operation executes normally or tailored recovery code is applied where exceptions would have been raised. As an initial step and evaluation of this idea, we propose to transform programs so that null pointer dereferences are handled automatically without a large runtime overhead. We increase robustness by replacing code that raises null pointer exceptions with error-handling code, allowing the program to continue execution. Our technique first finds potential null pointer dereferences and then automatically transforms programs to insert null checks and error-handling code. These transformations are guided by composable, context-sensitive recovery policies. Error-handling code may, for example, create default objects of the appropriate types, or restore data structure invariants. If no null pointers would be dereferenced, the transformed program behaves just as the original.We applied our transformation in experiments involving multiple benchmarks, the Java Standard Library, and externally reported null pointer exceptions. Our technique was able to handle the reported exceptions and allow the programs to continue to do useful work, with an average execution time overhead of less than 1% and an average bytecode space overhead of 22%.

Cited By

View all
  • (2022)NPEXProceedings of the 44th International Conference on Software Engineering10.1145/3510003.3510186(1532-1544)Online publication date: 21-May-2022
  • (2019)TBar: revisiting template-based automated program repairProceedings of the 28th ACM SIGSOFT International Symposium on Software Testing and Analysis10.1145/3293882.3330577(31-42)Online publication date: 10-Jul-2019
  • (2019)VFixProceedings of the 41st International Conference on Software Engineering10.1109/ICSE.2019.00063(512-523)Online publication date: 25-May-2019
  • Show More Cited By
  1. Changing Java's Semantics for Handling Null Pointer Exceptions

    Recommendations

    Comments

    Please enable JavaScript to view thecomments powered by Disqus.

    Information & Contributors

    Information

    Published In

    cover image Guide Proceedings
    ISSRE '08: Proceedings of the 2008 19th International Symposium on Software Reliability Engineering
    November 2008
    326 pages
    ISBN:9780769534053

    Publisher

    IEEE Computer Society

    United States

    Publication History

    Published: 10 November 2008

    Author Tag

    1. Null pointer, error handling, exception, recovery

    Qualifiers

    • Article

    Contributors

    Other Metrics

    Bibliometrics & Citations

    Bibliometrics

    Article Metrics

    • Downloads (Last 12 months)0
    • Downloads (Last 6 weeks)0
    Reflects downloads up to 18 Dec 2024

    Other Metrics

    Citations

    Cited By

    View all
    • (2022)NPEXProceedings of the 44th International Conference on Software Engineering10.1145/3510003.3510186(1532-1544)Online publication date: 21-May-2022
    • (2019)TBar: revisiting template-based automated program repairProceedings of the 28th ACM SIGSOFT International Symposium on Software Testing and Analysis10.1145/3293882.3330577(31-42)Online publication date: 10-Jul-2019
    • (2019)VFixProceedings of the 41st International Conference on Software Engineering10.1109/ICSE.2019.00063(512-523)Online publication date: 25-May-2019
    • (2018)Automatic Software RepairACM Computing Surveys10.1145/310590651:1(1-24)Online publication date: 23-Jan-2018
    • (2016)Automatic runtime recovery via error handler synthesisProceedings of the 31st IEEE/ACM International Conference on Automated Software Engineering10.1145/2970276.2970360(684-695)Online publication date: 25-Aug-2016
    • (2016)Automatic patch generation by learning correct codeACM SIGPLAN Notices10.1145/2914770.283761751:1(298-312)Online publication date: 11-Jan-2016
    • (2016)Automatic patch generation by learning correct codeProceedings of the 43rd Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages10.1145/2837614.2837617(298-312)Online publication date: 11-Jan-2016
    • (2015)Staged program repair with condition synthesisProceedings of the 2015 10th Joint Meeting on Foundations of Software Engineering10.1145/2786805.2786811(166-178)Online publication date: 30-Aug-2015
    • (2015)An analysis of patch plausibility and correctness for generate-and-validate patch generation systemsProceedings of the 2015 International Symposium on Software Testing and Analysis10.1145/2771783.2771791(24-36)Online publication date: 13-Jul-2015
    • (2014)Mutation analysis approach to develop reliable object-oriented softwareAdvances in Software Engineering10.1155/2014/1979832014(6-6)Online publication date: 1-Jan-2014
    • Show More Cited By

    View Options

    View options

    Media

    Figures

    Other

    Tables

    Share

    Share

    Share this Publication link

    Share on social media