Exception handling is an important built-in feature of many modern programming languages such as Java. It allows developers to deal with abnormal or unexpected conditions by try-catch blocks that may occur at runtime in advance. Missing or improper implementation of exception handling can cause catastrophic consequences such as system crash. However, previous studies reveal that developers are unwilling or feel it hard to adopt exception handling mechanism, and tend to ignore it until a system failure forces them to do so. To help developers with exception handling, existing work produces recommendations such as code examples and exception types, which still requires developers to localize the try blocks and modify the catch block code to fit the context. In this paper, we propose a novel neural approach for automated exception handling, which can predict locations of try blocks and automatically generate the complete catch blocks. We collect a large number of Java methods from GitHub and conduct experiments to evaluate our approach. The evaluation results, including quantitative measurement and human evaluation, show that our approach is highly effective and outperforms all baselines. Our work makes one step further towards automated exception handling.
Tue 22 Sep Times are displayed in time zone: (UTC) Coordinated Universal Time
02:20 - 03:20: Maintenance and Evolution (1)Research Papers / Tool Demonstrations at Wombat Chair(s): Yi LiNanyang Technological University, Singapore | |||
02:20 - 02:40 Talk | Learning to Handle Exceptions Research Papers Jian ZhangBeihang University, Xu WangBeihang University, Hongyu ZhangUniversity of Newcastle, Australia, Hailong SunBeihang University, Yanjun PuBeihang University, Xudong LiuBeihang University Pre-print | ||
02:40 - 03:00 Talk | BuildFast: History-Aware Build Outcome Prediction for Fast Feedback and Reduced Cost in Continuous Integration Research Papers Bihuan ChenFudan University, China, Linlin ChenFudan University, Chen ZhangFudan University, Xin PengFudan University, China | ||
03:00 - 03:10 Talk | OSLDetector: Identifying Open-Source Libraries through Binary Analysis Tool Demonstrations Dan ZhangTsinghua University |