skip to main content
10.1145/3613372.3613397acmotherconferencesArticle/Chapter ViewAbstractPublication PagessbesConference Proceedingsconference-collections
research-article

Applying Spectrum-Based Fault Localization to Android Applications

Published:25 September 2023Publication History

ABSTRACT

The pressing demand for high-quality mobile applications has a major influence on Software Engineering practices, such as testing and debugging. The variety of mobile platforms is permeated with different resources related to communication capabilities, sensors, and user-controlled options. As a result, applications may exhibit unexpected behaviors and resource interactions can introduce failures that manifest themselves in specific resource combinations. These failures can affect the quality of mobile applications and degrade the user experience. To reduce human effort of manual debugging, several techniques have been proposed and developed aiming to partially or fully automate fault localization. Fault localization techniques, such as Spectrum-based Fault Localization (SBFL), identify suspicious faulty program elements related to a software failure. However, we still lack empirical knowledge about the applicability of fault localization techniques in the context of mobile applications, specifically considering resource interaction failures. To address this problem, this paper evaluates the use of SBFL aiming to locate faults in 8 Android applications and verify the sensitivity of SBFL to variations in resource interactions. We rely on mutation testing to simulate faults and on the Ochiai coefficient as an indicator of the suspicious faulty code. Our results indicate that SBFL is able to rank more than 75% of the faulty code in 6 out of 8 applications. We also observed that the ranking of suspicious code varies depending on the combination of enabled resources (e.g., Wi-Fi and Location) in the mobile applications.

References

  1. R. Abreu, P. Zoeteweij, and A. J.C. van Gemund. 2007. On the Accuracy of Spectrum-based Fault Localization. In Testing: Academic and Industrial Conference Practice and Research Techniques - MUTATION (TAICPART-MUTATION). 89–98.Google ScholarGoogle Scholar
  2. Rui Abreu, P. Zoeteweij, and A. J. C. van Gemund. 2006. An Evaluation of Similarity Coefficients for Software Fault Localization. In Pacific Rim International Symposium on Dependable Computing (PRDC). 39–46.Google ScholarGoogle Scholar
  3. AnkiDroid. Accessed 6-May-2023. Anki flashcards on Android. https://github.com/ankidroid/Anki-AndroidGoogle ScholarGoogle Scholar
  4. S. Apel, D. Batory, C. Kästner, and G. Saake. 2013. Feature-oriented software product Lines. Springer Berlin / Heidelberg.Google ScholarGoogle Scholar
  5. S. Apel, S. Kolesnikov, N. Siegmund, C. Kästner, and B. Garvin. 2013. Exploring Feature Interactions in the Wild: The New Feature-Interaction Challenge. In International Workshop on Feature-Oriented Software Development (FOSD) (Indianapolis, Indiana, USA) (FOSD ’13). 1–8.Google ScholarGoogle Scholar
  6. Samuel Benton, Xia Li, Yiling Lou, and Lingming Zhang. 2022. Evaluating and Improving Unified Debugging. IEEE Transactions on Software Engineering 48, 11 (2022), 4692–4716.Google ScholarGoogle ScholarCross RefCross Ref
  7. T. F. Bowen, FS Dworack, C. Chow, N. Griffeth, G. E Herman, and Y-J Lin. 1989. The feature interaction problem in telecommunications systems. In International Conference on Software Engineering for Telecommunication Switching Systems (SETSS). 59–62.Google ScholarGoogle Scholar
  8. M. Ceccato, A. Marchetto, L. Mariani, C. D. Nguyen, and P. Tonella. 2015. Do Automatically Generated Test Cases Make Debugging Easier? An Experimental Assessment of Debugging Effectiveness and Efficiency. ACM Transactions on Software Engineering and Methodology 25, 1, Article 5 (2015), 38 pages.Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. M. B. Cohen, M. B. Dwyer, and J. Shi. 2007. Interaction Testing of Highly-Configurable Systems in the Presence of Constraints. In ACM SIGSOFT International Symposium on Software Testing and Analysis (ISSTA). 129–139.Google ScholarGoogle Scholar
  10. J. Dąbrowski, E. Letier, A. Perini, and A. Susi. 2022. Analysing app reviews for Software Engineering: a systematic literature review. Empirical Software Engineering 27, 43 (2022), 1–63.Google ScholarGoogle Scholar
  11. H. A. de Souza, D. Mutti, M. L. Chaim, and F. Kon. 2018. Contextualizing spectrum-based fault localization. Information and Software Technology 94 (2018), 245–261.Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. J. P. Diniz, C. -P. Wong, C. Kästner, and E. Figueiredo. 2021. Dissecting Strongly Subsuming Second-Order Mutants. In IEEE International Conference on Software Testing, Verification, and Validation (ICST). 171–181.Google ScholarGoogle Scholar
  13. C. Escobar-Velásquez, M. Linares-Vásquez, G. Bavota, M. Tufano, K. Moran, M. Di Penta, C. Vendome, C. Bernal-Cárdenas, and D. Poshyvanyk. 2020. Enabling Mutant Generation for Open- and Closed-Source Android Apps. IEEE Transactions on Software Engineering (TSE) 48, 1 (2020), 186–208.Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. F. Ferreira, G. Vale, J. P. Diniz, and E. Figueiredo. 2021. Evaluating T-wise testing strategies in a community-wide dataset of configurable software systems. Journal of Systems and Software (JSS) (2021), 110990.Google ScholarGoogle Scholar
  15. J. A. Galindo, H. Turner, D. Benavides, and J. White. 2016. Testing variability-intensive systems using automated analysis: an application to Android. Software Quality Journal (SQJ) 24 (2016), 365–405.Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. R. Gopinath, C. Jensen, and A. Groce. 2014. Code Coverage for Suite Evaluation by Developers. In IEEE/ACM International Conference on Software Engineering (ICSE). 72–82.Google ScholarGoogle Scholar
  17. Ground. Accessed 6-May-2023. Ground mobile data collection app for Android. https://github.com/google/ground-androidGoogle ScholarGoogle Scholar
  18. Mary Jean Harrold, Gregg Rothermel, Rui Wu, and Liu Yi. 1998. An Empirical Investigation of Program Spectra. SIGPLAN Notices 33, 7 (1998), 83–90.Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. S. Heiden, L. Grunske, T. Kehrer, F. Keller, A. van Hoorn, A. Filieri, and D. Lo. 2019. An evaluation of pure spectrum-based fault localization techniques for large-scale software systems. Software: Practice and Experience 49, 8 (2019), 1197–1224.Google ScholarGoogle ScholarCross RefCross Ref
  20. K. Holl and F. Elberzhager. 2019. Chapter One - Mobile Application Quality Assurance. Advances in Computers, Vol. 112. Elsevier, 1–77.Google ScholarGoogle Scholar
  21. J. A. Jones, M. Jean Harrold, and J. Stasko. 2002. Visualization of Test Information to Assist Fault Localization. In IEEE/ACM International Conference on Software Engineering (ICSE). 467–477.Google ScholarGoogle Scholar
  22. M. C. Júnior, D. Amalfitano, L. Garcés, A. R. Fasolino, Stevão A. Andrade, and M. Delamaro. 2022. Dynamic Testing Techniques of Non-functional Requirements in Mobile Apps: A Systematic Mapping Study. ACM Computing Surveys (CSUR) 54, 10s (2022), 1–38.Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. P. Kong, L. Li, J. Gao, T. Riom, Y. Zhao, T. F. Bissyandé, and J. Klein. 2021. ANCHOR: locating Android framework-specific crashing faults. Automated Software Engineering 28, 2 (2021), 10.Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. T. Laurent, M. Papadakis, M. Kintis, C. Henard, Y. Le Le Traon, and A. Ventresque. 2017. Assessing and Improving the Mutation Testing Practice of PIT. In IEEE International Conference on Software Testing, Verification, and Validation (ICST). 430–435.Google ScholarGoogle Scholar
  25. M. Linares-Vásquez, C. Bernal-Cardenas, K. Moran, and D. Poshyvanyk. 2017. How do Developers Test Android Applications?. In IEEE International Conference on Software Maintenance and Evolution (ICSME). 613–622.Google ScholarGoogle Scholar
  26. Y. Lu, M. Pan, J. Zhai, T. Zhang, and X. Li. 2019. Preference-wise testing for Android applications. In ACM Joint Meeting on European Software Engineering Conference and Symposium on the Foundations of Software Engineering (ESEC/FSE). 268–278.Google ScholarGoogle Scholar
  27. C. Luo, J. Goncalves, E. Velloso, and V. Kostakos. 2020. A survey of context simulation for testing mobile context-aware applications. ACM Computing Surveys (CSUR) 53, 1 (2020), 1–39.Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. P. Machado, J. Campos, and R. Abreu. 2013. MZoltar: Automatic Debugging of Android Applications. In International Workshop on Software Development Lifecycle for Mobile (DeMobile). 9–16.Google ScholarGoogle Scholar
  29. E. H. Marinho, F. Ferreira, J. P. Diniz, and E. Figueiredo. 2023. Evaluating testing strategies for resource related failures in mobile applications. Software Quality Journal (2023), 1–27.Google ScholarGoogle Scholar
  30. A. J. Offutt, A. Lee, G. Rothermel, R. H. Untch, and C. Zapf. 1996. An Experimental Determination of Sufficient Mutant Operators. ACM Transactions on Software Engineering and Methodology 5, 2 (1996), 99–118.Google ScholarGoogle ScholarDigital LibraryDigital Library
  31. J. Oliveira, M. Souza, M. Flauzino, R. Durelli, and E. Figueiredo. 2022. Can Source Code Analysis Indicate Programming Skills? A Survey with Developers. In International Conference on the Quality of Information and Communications Technology (QUATIC). 156–171.Google ScholarGoogle Scholar
  32. Openscale. Accessed 6-May-2023. Open-source weight and body metrics tracker, with support for Bluetooth scales. https://github.com/oliexdev/openScaleGoogle ScholarGoogle Scholar
  33. Owntracks. Accessed 6-May-2023. Open-source weight and body metrics tracker, with support for Bluetooth scales. https://github.com/owntracks/androidGoogle ScholarGoogle Scholar
  34. M. Papadakis, M. Kintis, J. Zhang, Y. Jia, Y. Le Traon, and M. Harman. 2019. Mutation Testing Advances: An Analysis and Survey. Advances in Computers, Vol. 112. Elsevier, 275–378.Google ScholarGoogle Scholar
  35. O. Parry, G. M. Kapfhammer, M. Hilton, and P. McMinn. 2021. A Survey of Flaky Tests. ACM Transactions on Software Engineering and Methodology (TOSEM) 31, 1, Article 17 (2021), 74 pages.Google ScholarGoogle Scholar
  36. S. Pearson, J. Campos, R. Just, G. Fraser, R. Abreu, M. D. Ernst, D. Pang, and B. Keller. 2017. Evaluating and Improving Fault Localization. In IEEE/ACM International Conference on Software Engineering (ICSE). 609–620.Google ScholarGoogle Scholar
  37. PocketHub. Accessed 6-May-2023. PocketHub Android App. https://github.com/pockethub/PocketHubGoogle ScholarGoogle Scholar
  38. M. Polo-Usaola and I. Rodríguez-Trujillo. 2021. Analysing the combination of cost reduction techniques in Android mutation testing. Software Testing, Verification and Reliability 31, 7 (2021), e1769.Google ScholarGoogle ScholarCross RefCross Ref
  39. RadioDroid. Accessed 6-May-2023. Radio Browser App. https://github.com/segler-alex/RadioDroidGoogle ScholarGoogle Scholar
  40. Q. I. Sarhan and Á. Beszédes. 2022. A Survey of Challenges in Spectrum-Based Software Fault Localization. IEEE Access 10 (2022), 10618–10639.Google ScholarGoogle ScholarCross RefCross Ref
  41. H. N. Silva, J. Prado Lima, S. R. Vergilio, and A. T. Endo. 2022. A mapping study on mutation testing for mobile applications. Software Testing, Verification and Reliability 32, 8 (2022), e1801.Google ScholarGoogle ScholarCross RefCross Ref
  42. T. Su, L. Fan, S. Chen, Y. Liu, L. Xu, G. Pu, and Z. Su. 2020. Why my app crashes? Understanding and benchmarking framework-specific exceptions of Android apps. IEEE Transactions on Software Engineering (TSE) (2020), 1115–1137.Google ScholarGoogle Scholar
  43. J. Sun, T. Su, J. Li, Z. Dong, G. Pu, T. Xie, and Z. Su. 2021. Understanding and Finding System Setting-Related Defects in Android Apps. In ACM SIGSOFT International Symposium on Software Testing and Analysis (ISSTA). 204–215.Google ScholarGoogle Scholar
  44. Threema. Accessed 6-May-2023. Threema App for Android. https://github.com/threema-ch/threema-androidGoogle ScholarGoogle Scholar
  45. P. Tramontana, D. Amalfitano, N. Amatucci, and A. R. Fasolino. 2019. Automated functional testing of mobile applications: a systematic mapping study. Software Quality Journal (SQJ) 27, 1 (2019), 149–201.Google ScholarGoogle ScholarDigital LibraryDigital Library
  46. R. H. Untch, A. J. Offutt, and M. J. Harrold. 1993. Mutation Analysis Using Mutant Schemata. In ACM SIGSOFT International Symposium on Software Testing and Analysis (ISSTA). 139–148.Google ScholarGoogle Scholar
  47. I. K. Villanes, A. T Endo, and A. C. Dias-Neto. 2022. A multivocal literature mapping on mobile compatibility testing. International Journal of Computer Applications in Technology 69, 2 (2022), 173–192.Google ScholarGoogle ScholarDigital LibraryDigital Library
  48. Y. Wang, M. V. Mäntylä, Z. Liu, J. Markkula, and P. Raulamo-jurvanen. 2022. Improving test automation maturity: A multivocal literature review. Software Testing, Verification and Reliability 32, 3 (2022), e1804.Google ScholarGoogle ScholarCross RefCross Ref
  49. H. M. Win, S. H. Tan, and Y. Sui. 2023. Event-aware precise dynamic slicing for automatic debugging of Android applications. Journal of Systems and Software (JSS) (2023), 111606.Google ScholarGoogle Scholar
  50. C. Wohlin, P. Runeson, M. Host, M. C. Ohlsson, B. Regnell, and A. Wesslen. 2012. Experimentation in Software Engineering. Springer Berlin / Heidelberg.Google ScholarGoogle Scholar
  51. W. E. Wong, V. Debroy, R. Gao, and Y. Li. 2014. The DStar Method for Effective Software Fault Localization. IEEE Transactions on Reliability 63, 1 (2014), 290–308.Google ScholarGoogle ScholarCross RefCross Ref
  52. W. E. Wong, R. Gao, Y. Li, R. Abreu, and F. Wotawa. 2016. A Survey on Software Fault Localization. IEEE Transactions on Software Engineering 42, 8 (2016), 707–740.Google ScholarGoogle ScholarDigital LibraryDigital Library
  53. WordPress. Accessed 6-May-2023. WordPress for Android. https://github.com/wordpress-mobile/WordPress-AndroidGoogle ScholarGoogle Scholar
  54. A. Zakari, S. P. Lee, K. A. Alam, and R. Ahmad. 2019. Software fault localisation: a systematic mapping study. IET Software 13, 1 (2019), 60–74.Google ScholarGoogle ScholarDigital LibraryDigital Library
  55. C. Zamfir and G. Candea. 2010. Execution Synthesis: A Technique for Automated Software Debugging (EuroSys). In European Conference on Computer Systems. 321–334.Google ScholarGoogle Scholar
  56. M. Zhang, Y. Li, X. Li, L. Chen, Y. Zhang, L. Zhang, and S. Khurshid. 2021. An Empirical Study of Boosting Spectrum-Based Fault Localization via PageRank. IEEE Transactions on Software Engineering 47, 6 (2021), 1089–1113.Google ScholarGoogle ScholarCross RefCross Ref
  57. D. Zou, J. Liang, Y. Xiong, M. D. Ernst, and L. Zhang. 2021. An Empirical Study of Fault Localization Families and Their Combinations. IEEE Transactions on Software Engineering 47, 2 (2021), 332–347.Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Applying Spectrum-Based Fault Localization to Android Applications

    Recommendations

    Comments

    Login options

    Check if you have access through your login credentials or your institution to get full access on this article.

    Sign in
    • Published in

      cover image ACM Other conferences
      SBES '23: Proceedings of the XXXVII Brazilian Symposium on Software Engineering
      September 2023
      570 pages
      ISBN:9798400707872
      DOI:10.1145/3613372

      Copyright © 2023 ACM

      Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than the author(s) must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected].

      Publisher

      Association for Computing Machinery

      New York, NY, United States

      Publication History

      • Published: 25 September 2023

      Permissions

      Request permissions about this article.

      Request Permissions

      Check for updates

      Qualifiers

      • research-article
      • Research
      • Refereed limited

      Acceptance Rates

      Overall Acceptance Rate147of427submissions,34%
    • Article Metrics

      • Downloads (Last 12 months)33
      • Downloads (Last 6 weeks)5

      Other Metrics

    PDF Format

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader

    HTML Format

    View this article in HTML Format .

    View HTML Format