Lune

ASE2020顶会

Learning to Handle Exceptions

Jian Zhang, Xu Wang, Hongyu Zhang, Hailong Sun, Yanjun Pu, Xudong Liu

摘要

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 that may occur at runtime in advance by using try-catch blocks. 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 to 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.

问 Lune

几分钟读透这篇 Paper,不用再花一下午。

Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。

已有 10 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。

可以从这些问题问起

Lune 可以查阅

全文 · 引用它的顶会 Paper · 相关的 Paper

获取答案

免费开始,无需绑卡

脉络

  • Detecting Condition-Related Bugs with Control Flow Graph Neural Network 引用了 Retrieval-based neural source code summarization
  • Learning to Locate and Describe Vulnerabilities 引用了 Detecting Condition-Related Bugs with Control Flow Graph Neural Network
  • Learning to Locate and Describe Vulnerabilities 引用了 Retrieval-based neural source code summarization
  • CrystalBLEU: Precisely and Efficiently Measuring the Similarity of Code 引用了 Retrieval-based neural source code summarization
它引用的引用它的从左到右按年份排列,引用越多,位置越高。

引用它的顶会 Paper10

  1. CrystalBLEU: Precisely and Efficiently Measuring the Similarity of CodeAryaz Eghbali, Michael PradelASE 2022 · 33 次引用
  2. From Misuse to Mastery: Enhancing Code Generation with Knowledge-Driven AI ChainingXiaoxue Ren, Xinyuan Ye, Dehai Zhao, Zhenchang Xing 等ASE 2023 · 28 次引用
  3. Thinking Like a Developer? Comparing the Attention of Humans with Neural Models of CodeMatteo Paltenghi, Michael PradelASE 2021 · 21 次引用
  4. Detecting Condition-Related Bugs with Control Flow Graph Neural NetworkJian Zhang, Xu Wang, Hongyu Zhang, Hailong Sun 等ISSTA 2023 · 19 次引用
  5. Learning to Locate and Describe VulnerabilitiesJian Zhang, Shangqing Liu, Xu Wang, Tianlin Li 等ASE 2023 · 8 次引用

它引用的 Paper1

  1. Retrieval-based neural source code summarizationJian Zhang, Xu Wang, Hongyu Zhang, Hailong Sun 等ICSE 2020 · 242 次引用

相关 Paper

  1. Programming Assistant for Exception Handling with CodeBERTYuchen Cai, Aashish Yadavally, Abhishek Mishra, Genesis Montejo 等ICSE 2024 · 4 次引用
  2. Code recommendation for exception handlingTam Nguyen, Phong Vu, Tung NguyenFSE 2020 · 22 次引用
  3. Which Exception Shall We Throw?Hao ZhongASE 2022 · 5 次引用
  4. BERT-Based Code Learning for Exception Localization and Type PredictionChongyu Zhang, Qiping Tao, Liangyu Chen, Min ZhangAAAI 2025 · 1 次引用
  5. Where Shall We Log? Studying and Suggesting Logging Locations in Code BlocksZhenhao Li, Tse-Hsun Chen, Weiyi ShangASE 2020 · 41 次引用
黄昏的海面,两侧是细线勾勒的悬崖