An Empirical Study on Inter-Component Exception Notification in Android Platform

  • Vladymir L. Bezerra IFCE
  • Lincoln S. Rocha UFC
  • João Bosco F. Filho UFC
  • Fernando A. M. Trinta

Resumo




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.




 
Palavras-chave: Exception Notification, Android Inter-Component Communication, Mining Software Repositories

Referências

G. Bavota, M. Linares-VÃĄsquez, C. E. Bernal-CÃĄdenas, M. D. Penta, R. Oliveto, and D. Poshyvanyk. 2015. The Impact of API Change- and Fault-Proneness on the User Ratings of Android Apps. IEEE Transactions on Software Engineering 41, 4 (April 2015), 384--407.

G. Bavota, M. Linares-VÃĄsquez, C. E. Bernal-CÃĄdenas, M. D. Penta, R. Oliveto, and D. Poshyvanyk. 2015. The Impact of API Change-and Fault-Proneness on the User Ratings of Android Apps. IEEE Transactions on Software Engineering 41, 4 (April 2015), 384--407.

Peter A. Buhr and W. Y. Russell Mok. 2000. Advanced Exception Handling Mechanisms. IEEE Transactions on Software Engineering 26 (September 2000), 820--836. Issue 9.

Nélio Cacho, Thiago César, Thomas Filipe, Eliezio Soares, Arthur Cassio, Rafael Souza, Israel Garcia, Eiji Adachi Barbosa, and Alessandro Garcia. 2014. Trading Robustness for Maintainability: An Empirical Study of Evolving C# Programs. In Proceedings of the 36th International Conference on Software Engineering (ICSE 2014). 584--595.

Chien-Tsun Chen, Yu Chin Cheng, Chin-Yun Hsieh, and I-Lang Wu. 2009. Exception Handling Refactorings: Directed by Goals and Driven by Bug Fixing. Journal of Systems and Software 82, 2 (2009), 333--345.

Erika Chin, Adrienne Porter Felt, Kate Greenwood, and David Wagner. 2011. Analyzing Inter-application Communication in Android. In Proceedings of the 9th International Conference on Mobile Systems, Applications, and Services (MobiSys '11). ACM, New York, NY, USA, 239--252.

Kwanghoon Choi and Byeong-Mo Chang. 2015. A Lightweight Approach to Component-level Exception Mechanism for Robust Android Apps. Comput. Lang. Syst. Struct. 44, PC (Dec. 2015), 283--298.

Roberta Coelho, Lucas Almeida, Georgios Gousios, Arie van Deursen, and Christoph Treude. 2016. Exception handling bug hazards in Android. Empirical Software Engineering (2016), 1--41. https://doi.org/10.1007/s10664-016-9443-7 DisponÃŋvel em: http://dx.doi.org/10.1007/s10664-016-9443-7. Acesso em: 01 nov.2017.

Robert Dyer, Hoan Anh Nguyen, Hridesh Rajan, and Tien N. Nguyen. 2013. Boa: A Language and Infrastructure for Analyzing Ultra-Large-Scale Software Repositories. In Proceedings of the 35th International Conference on Software Engineering (ICSE'13). 422--431.

Robert Dyer, Hridesh Rajan, and Tien N. Nguyen. 2013. Declarative Visitors to Ease Fine-grained Source Code Mining with Full History on Billions of AST Nodes. In Proceedings of the 12th International Conference on Generative Programming: Concepts & Experiences (GPCE). 23--32.

Raymond Gallardo, Scott Hommel, Sowmya Kannan, Joni Gordon, and Sharon Biocca Zakhour. 2014. The Java Tutorial: A Short Course on the Basics (6th ed.). Addison-Wesley Professional. 864 pages.

Alessandro F Garcia, Cecília M.F Rubira, Alexander Romanovsky, and Jie Xu. 2001. A Comparative Study of Exception Handling Mechanisms for Building Dependable Object-Oriented Software. Journal of Systems and Software 59, 2 (2001), 197--222.

Roee Hay, Omer Tripp, and Marco Pistoia. 2015. Dynamic Detection of Inter-application Communication Vulnerabilities in Android. In Proceedings of the 2015 International Symposium on Software Testing and Analysis (ISSTA 2015). ACM, New York, NY, USA, 118--128. https://doi.org/10.1145/2771783.2771800 DisponÃŋvel em: http://doi.acm.org/10.1145/2771783.2771800.Acesso em: 01 nov. 2017.

Jakob Jenkov. 2013. Java Exception Handling (1nd ed.). Amazon Kindle.

Maria Kechagia and Diomidis Spinellis. 2014. Undocumented and Unchecked: Exceptions That Spell Trouble. In Proceedings of the 11th Working Conference on Mining Software Repositories (MSR 2014). ACM, New York, NY, USA, 312--315.

Amiya K. Maji, Fahad A. Arshad, Saurabh Bagchi, and Jan S. Rellermeyer. 2012. An Empirical Study of the Robustness of Inter-component Communication in Android. In Proceedings of the 2012 42Nd Annual IEEE/IFIP International Conference on Dependable Systems and Networks (DSN) (DSN '12). IEEE Computer Society, Washington, DC, USA, 1--12.

Roberto Minelli and Michele Lanza. 2013. Software Analytics for Mobile Applications-Insights & Lessons Learned. In Proceedings of the 2013 17th European Conference on Software Maintenance and Reengineering (CSMR '13). IEEE, Washington, DC, USA, 144--153.

Neo4j. 2012. Neo4j - The WorldâĂŹs Leading Graph Database. DisponÃŋvel em: http://neo4j.org. Acesso em: 01 nov. 2017.

Damien Octeau, Patrick McDaniel, Somesh Jha, Alexandre Bartel, Eric Bodden, Jacques Klein, and Yves Le Traon. 2013. Effective Inter-component Communication Mapping in Android with Epicc: An Essential Step Towards Holistic Security Analysis. In Proceedings of the 22Nd USENIX Conference on Security (SEC'13). USENIX Association, Berkeley, CA, USA, 543--558.

Juliana Oliveira, Deise Borges, Thaisa Silva, Nelio Cacho, and Fernando Castor. 2018. Do android developers neglect error handling? a maintenance-Centric study on the relationship between android abstractions and uncaught exceptions. Journal of Systems and Software 136 (2018), 1--18. https://doi.org/10.1016/j.jss.2017.10.032

Juliana Oliveira, Nelio Cacho, Deise Borges, Thaisa Silva, and Fernando Castor. 2016. An Exploratory Study of Exception Handling Behavior in Evolving Android and Java Applications. In Proceedings of the 30th Brazilian Symposium on Software Engineering (SBES '16). ACM, New York, NY, USA, 23--32. https://doi.org/10.1145/2973839.2973843 DisponÃŋel em: http://doi.acm.org/10.1145/2973839.2973843. Acesso em: 01 nov. 2017.

Onofrio Panzarino. 2014. Learning Cypher. Packt Publishing.

Etienne Payet and Fausto Spoto. 2014. An Operational Semantics for Android Activities. In Proceedings of the ACM SIGPLAN 2014 Workshop on Partial Evaluation and Program Manipulation (PEPM '14). ACM, New York, NY, USA, 121--132.

Gian Pietro Picco, Christine Julien, Amy L. Murphy, Mirco Musolesi, and Gruia-Catalin Roman. 2014. Software Engineering for Mobility: Reflecting on the Past, Peering into the Future. In Proceedings of the on Future of Software Engineering (FOSE 2014). ACM, New York, NY, USA, 13--28.

Francisco Diogo Queiroz and Roberta Coelho. 2016. Characterizing the Exception Handling Code of Android Apps. In 2016 X Brazilian Symposium on Software Components, Architectures and Reuse, SBCARS 2016, Maringá, Brazil, September 19-20, 2016. 131--140. https://doi.org/10.1109/SBCARS.2016.25 DisponÃŋvel em: https://doi.org/10.1109/SBCARS.2016.25.Acesso em: 01 nov. 2017.

William R. Shadish, Thomas D. Cook, and Donald T. Campbell. 2002. Experimental and Quasi-experimental Designs for Generalized Causal Inference. Houghton Mifflin Co.

Ali Shahrokni and Robert Feldt. 2013. A Systematic Review of Software Robustness. Information and Software Technology 55, 1 (Jan. 2013), 1--17.

Mark Weiser. 1991. The Computer for the 21 st Century. Scientific american 265, 3 (1991), 94--105.

Hui Ye, Shaoyin Cheng, Lanbo Zhang, and Fan Jiang. 2013. DroidFuzzer: Fuzzing the Android Apps with Intent-Filter Tag. In Proceedings of International Conference on Advances in Mobile Computing & Multimedia (MoMM'13). ACM, New York, NY, USA, Article 68, 7 pages.

Pingyu Zhang and Sebastian Elbaum. 2014. Amplifying Tests to Validate Exception Handling Code: An Extended Study in the Mobile Application Domain. ACM Trans. Softw. Eng. Methodol. 23, 4, Article 32 (Sept. 2014), 28 pages.

ÃL'tienne Payet and Fausto Spoto. 2012. Static analysis of Android programs. Information and Software Technology 54, 11 (2012), 1192--1201.
Publicado
23/09/2019
BEZERRA, Vladymir L.; ROCHA, Lincoln S.; F. FILHO, João Bosco; TRINTA, Fernando A. M.. An Empirical Study on Inter-Component Exception Notification in Android Platform. In: SIMPÓSIO BRASILEIRO DE ENGENHARIA DE SOFTWARE (SBES), 33. , 2019, Salvador. Anais [...]. Porto Alegre: Sociedade Brasileira de Computação, 2019 .