Moonstone:
Support for Understanding and Writing Exception Handling Code

Florian Kistner, Mary Beth Kery, Michael Puskas, Steven Moore, Brad A. Myers

IEEE Symposium on Visual Languages and Human-Centric Computing (VL/HCC), 2017

Exception handling in Java is often prone to mistakes. Studies have found that programmers make a number of common bad-practices and misjudgments when it comes to error handling. Moonstone is a research prototype and plug-in for Eclipse designed to guide users to reason about error paths, and help them avoid bad practices.

The official acronym for Moonstone is “Making Object Oriented Novel Software Tools Optimized for Noting Exceptions.” A moonstone is also a type of gemstone, shown on the right.

Abstract

Moonstone is a new plugin for Eclipse that supports developers in understanding exception flow and in writing exception handlers in Java. Understanding exception control flow is paramount for writing robust exception handlers, a task many developers struggle with. To help with this understanding, we present two new kinds of information: ghost comments, which are transient overlays that reveal potential sources of exceptions directly in code, and annotated highlights of skipped code and associated handlers. To help developers write better handlers, Moonstone additionally provides project-specific recommendations, detects common bad practices, such as empty or inadequate handlers, and provides automatic resolutions, introducing programmers to advanced Java exception handling features, such as try-with-resources. We present findings from two formative studies that informed the design of Moonstone. We then show with a user study that Moonstone improves users’ understanding in certain areas and enables developers to amend exception handling code more quickly and correctly.

Paper Preprint PDF Full-Text

Citation

@inproceedings{Kistner-VLHCC17-Moonstone,
  Title = {\textsc{Moonstone:} Support for Understanding and Writing Exception Handling Code},
  Author = {Florian Kistner and Mary Beth Kery and Michael Puskas and Steven Moore and Brad A. Myers},
  Booktitle = {2017 IEEE Symposium on Visual Languages and Human-Centric Computing (VL/HCC '17)},
  Month = Oct,
  Year = {2017},
  Address = {Raleigh, NC, USA},
  Pages = {63--71}
}

Florian Kistner, Mary Beth Kery, Michael Puskas, Steven Moore, Brad A. Myers, “Moonstone: Support for Understanding and Writing Exception Handling Code,” 2017 IEEE Symposium on Visual Languages and Human-Centric Computing (VL/HCC’17), October 2017, Raleigh, NC, USA, pp. 63–71.

Sponsors

This work was supported by a fellowship within the FITweltweit program of the German Academic Exchange Service (DAAD) and the National Science Foundation, Grant. No. CNS-1423054. Any opinions, findings and conclusions or recommendations expressed in this material are those of the author(s) and do not necessarily reflect those of the sponsors.

ACM Mary Beth Kery, Claire Le Goues, Brad A. Myers. “Examining programmer practices for locally handling exceptions.” Proceedings of the 13th International Conference on Mining Software Repositories. ACM, 2016.

© 2017 IEEE / Carnegie Mellon University. All rights reserved.