An Empirical Study on Inter-Component Exception Notification in Android Platform - Bezerra, Vladymir L.; Rocha, Lincoln S.; F. Filho, João Bosco; Trinta, Fernando A. M. (Anais do Simpósio Brasileiro de Engenharia de Software (SBES); 2019: Anais do XXXIII Simpósio Brasileiro de Engenharia de Software, 2019)
Android developers extensively use exception handling to improve robustness of mobile applications. The Android architecture and the object-oriented paradigm impose complexity to the way applications handle exceptions; many different components communicate among themselves and exceptions may be raised in parts that are not responsible for handling the error. A straightforward solution is to send the exception notification to its concerning handler. However, we do not know to which extent developers are sending exception notifications between Android components. Studying and analyzing the state of the practice of exception notification in Android will allow us to identify patterns and flaws in real-world applications; drawing this panorama can help developers to construct more reliable, modular and maintainable solutions. For this purpose, we conduct an empirical study that takes 66,099 Android projects and answers: (i) if the project uses exception notification; and (ii) how notification is performed (how signaling and handling code is implemented). We found that 1,327 applications use exception notification, following different practices: 2 for sending notifications and 2 for handling the exceptions. Our study paves the way for constructing better mechanisms for communicating exception notifications in Java-based Android applications.