首页> 外文会议>IEEE/ACM International Conference on Program Comprehension;International Conference on Software Engineering >Where to Handle an Exception? Recommending Exception Handling Locations from a Global Perspective
【24h】

Where to Handle an Exception? Recommending Exception Handling Locations from a Global Perspective

机译:哪里可以处理异常? 从全球视角推荐异常处理位置

获取原文

摘要

Exception handling is an effective mechanism to guarantee software reliability in modern programming languages. An exception interrupts the program execution and propagates backwards along the call chain until the exception is caught by an exception handler. In software development practices, developers may be confused in determining where to place the exception handler in the call chain. The reason is that exception handling requires a developer to take a comprehensive consideration from a global perspective of the software project. In this paper, we propose an automatic approach EHAdvisor, which recommends exception handling locations from the global perspective of the project. EHAdvisor first trains a binary classification model based on four types of features, including architectural features, project features, functional features, and exception features. Then, for a new code snippet with exceptions, EHAdvisor predicts the exception catching probability for each method in the call chain based on the classification model and recommends Top-K exception handling locations based on the probability ranking. We conducted experiments on a dataset from 29 high-quality open source projects. Experimental results show that EHAdvisor achieves an average Top-1 recommendation success rate of 70.83% for across-project location recommendation and an average Top-1 accuracy of 86.21% for intra-project recommendation. Experiments on the importance scores show that global features, such as project features and architectural features, are evidently important to the recommendation of exception handling locations.
机译:例外处理是一种有效的机制,可以保证现代编程语言中的软件可靠性。异常中断程序执行并沿呼叫链向后传播,直到异常处理程序捕获。在软件开发实践中,开发人员可能会混淆确定将例外处理程序放在呼叫链中。原因是例外处理需要开发人员从软件项目的全球角度来全面考虑。在本文中,我们提出了一种自动方法EHAdvisor,它推荐了从项目的全球视角下处理位置。 EHAdvisor首先通过四种类型的功能进行制定二进制分类模型,包括架构功能,项目功能,功能功能和例外功能。然后,对于具有异常的新代码片段,EHAdvisor基于分类模型预测呼叫链中的每个方法的异常捕捉概率,并根据概率排名推荐Top-K异常处理位置。我们在来自29个高质量开源项目的数据集上进行了实验。实验结果表明,EPAdvisor达到了平均全面的推荐率为70.83%,为项目建议的平均高精度为86.21%。重要评分的实验表明,全局功能(如项目特征和架构特征)显然对异常处理位置的建议很重要。

著录项

相似文献

  • 外文文献
  • 中文文献
  • 专利
获取原文

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号