首页> 外文期刊>The Journal of Systems and Software >Do android developers neglect error handling? a maintenance-Centric study on the relationship between android abstractions and uncaught exceptions
【24h】

Do android developers neglect error handling? a maintenance-Centric study on the relationship between android abstractions and uncaught exceptions

机译:Android开发人员会忽略错误处理吗?关于android抽象与未捕获异常之间关系的以维护为中心的研究

获取原文
获取原文并翻译 | 示例
           

摘要

All the mainstream programming languages in widespread use for mobile app development provide error handling mechanisms to support the implementation of robust apps. Android apps, in particular, are usually written in the Java programming language. Java includes an exception handling mechanism that allows programs to signal the occurrence of errors by throwing exceptions and to handle these exceptions by catching them. All the Android-specific abstractions, such as activities and asynctasks, can throw exceptions when errors occur. When an app catches the exceptions that it or the libraries upon which it depends throw, it can resume its activity or, at least, fail in a graceful way. On the other hand, uncaught exceptions can lead an app to crash, particularly if they occur within the main thread. Previous work has shown that, in real Android apps available at the Play Store, uncaught exceptions thrown by Android-specific abstractions often cause these apps to fail. This paper presents an empirical study on the relationship between the usage of Android abstractions and uncaught exceptions. Our approach is quantitative and maintenance-centric. We analyzed changes to both normal and exception handling code in 112 versions extracted from 16 software projects covering a number of domains, amounting to more than 3 million LOC. Change impact analysis and exception flow analysis were performed on those versions of the projects. The main finding of this study is that, during the evolution of the analyzed apps, an increase in the use of Android abstractions exhibits a positive and statistically significant correlation with the number of uncaught exception flows. Since uncaught exceptions cause apps to crash, this result suggests that these apps are becoming potentially less robust as a consequence of exception handling misuse. Analysis of multiple versions of these apps revealed that Android developers usually employ abstractions that may throw exceptions without adding the appropriate handlers for these exceptions. This study highlights the need for better testing and verification tools with a focus on exception handling code and for a change of culture in Android development or, at least, in the design of its APIs.
机译:所有广泛用于移动应用程序开发的主流编程语言都提供了错误处理机制,以支持强大的应用程序的实现。特别是Android应用程序,通常是用Java编程语言编写的。 Java包含一个异常处理机制,该机制允许程序通过引发异常来指示错误的发生并通过捕获异常来处理这些异常。当发生错误时,所有特定于Android的抽象(例如活动和asynctasks)都可能引发异常。当应用程序捕获到它或其依赖的库引发的异常时,它可以恢复其活动,或者至少以一种优美的方式失败。另一方面,未捕获的异常可能导致应用崩溃,尤其是如果它们发生在主线程中。先前的工作表明,在Play商店提供的实际Android应用中,特定于Android的抽象引发的未捕获异常通常会导致这些应用失败。本文对Android抽象的用法与未捕获的异常之间的关系进行了实证研究。我们的方法是量化和以维护为中心。我们分析了从涵盖多个域的16个软件项目中提取的112个版本中的正常代码和异常处理代码的更改,总计超过300万个LOC。对那些版本的项目执行了变更影响分析和异常流分析。这项研究的主要发现是,在分析应用程序的演变过程中,Android抽象使用量的增加与未捕获异常流的数量呈正相关和统计上的显着相关性。由于未捕获的异常会导致应用程序崩溃,因此该结果表明,由于异常处理的滥用,这些应用程序可能变得不那么健壮。对这些应用程序的多个版本的分析表明,Android开发人员通常会使用可能引发异常的抽象,而无需为这些异常添加适当的处理程序。这项研究强调了对更好的测试和验证工具的需求,重点是异常处理代码以及Android开发或至少在其API设计中文化的改变。

著录项

相似文献

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

客服邮箱:kefu@zhangqiaokeyan.com

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

  • 服务号