Atoms of Confusion in the Android Open Source Project: A Prevalence Study

  • Davi Tabosa UFC
  • Windson Viana UFC
  • Lincoln Rocha UFC

Resumo


The Android Open Source Project (AOSP) is the open-source project responsible for the Android operating system. In the AOSP, developers collaborate to add features, fix bugs, and improve the performance of a code base of more than 14 million lines written in different programming languages (e.g., C, Java, and Kotlin). This code must have minimum quality requirements to facilitate its maintenance and evolution. However, latent software quality problems can persist in such complex projects, leading to maintainability and evolution issues. An example of a latent problem is Atoms of Confusion (AC), small indivisible code fragments that cause comprehension difficulties. To shed light on this matter, we conducted an empirical study in the AOSP with twofold goals: (i) perform a prevalence and frequency analysis of ACs in this project, and (ii) relate ACs presence with Chidamber & Kemerer (CK) metrics suite. We found that 331 of the 370 AOSP repositories analyzed have at least one atom, with Logic as Control Flow being the most frequent and prevalent, with more than 110,000 occurrences found and present in 96% of the repositories with the presence of atoms. We also observed that the presence of ACs has a positive correlation with some CK metrics, such as WMC (Weighted Methods per Class) and RFC (Response for a Class), as well as the number of LOC (Lines of Code).

Referências

M. Aniche. Java code metrics calculator (CK), 2015. Available in [link].

V. Bogachenkova, L. Nguyen, F. Ebert, A. Serebrenik, and F. Castor. Evaluating atoms of confusion in the context of code reviews. In 2022 IEEE International Conference on Software Maintenance and Evolution (ICSME), pages 404–408, 2022.

S. R. Chidamber and C. F. Kemerer. A metrics suite for object oriented design. IEEE Transactions on software engineering, 20(6):476–493, 1994.

D. Feijó, C. de Almeida, and L. Rocha. Studying the impact of continuous delivery adoption on atoms of confusion rate in open-source projects. In Anais do XI Workshop de Visualização, Evolução e Manutenção de Software, pages 6–10, Porto Alegre, RS, Brasil, 2023. SBC.

D. Gopstein, J. Iannacone, Y. Yan, L. DeLong, Y. Zhuang, M. K.-C. Yeh, and J. Cappos. Understanding misunderstandings in source code. In Proceedings of the 2017 11th Joint Meeting on Foundations of Software Engineering, pages 129–139, 2017.

D. Gopstein, H. H. Zhou, P. Frankl, and J. Cappos. Prevalence of confusing code in software projects: Atoms of confusion in the wild. In Proceedings of the 15th International Conference on Mining Software Repositories, pages 281–291, 2018.

C. Langhout and M. Aniche. Atoms of confusion in java. In 2021 IEEE/ACM 29th International Conference on Program Comprehension (ICPC), pages 25–35. IEEE, 2021.

W. Mendes, O. Pinheiro, E. Santos, L. Rocha, and W. Viana. Dazed and confused: Studying the prevalence of atoms of confusion in long-lived java libraries. In 2022 IEEE International Conference on Software Maintenance and Evolution (ICSME), pages 106–116. IEEE, 2022.

R. Pawlak, M. Monperrus, N. Petitprez, C. Noguera, and L. Seinturier. Spoon: A Library for Implementing Analyses and Transformations of Java Source Code. Software: Practice and Experience, 46:1155–1179, 2015.

O. Pinheiro, L. Rocha, and W. Viana. How they relate and leave: Understanding atoms of confusion in open-source java projects. In 2023 IEEE 23rd International Working Conference on Source Code Analysis and Manipulation (SCAM), pages 119–130. IEEE, 2023.

D. Tabosa, O. Pinheiro, L. Rocha, and W. Viana. A dataset of atoms of confusion in the android open source project. In 2024 IEEE/ACM 21st International Conference on Mining Software Repositories (MSR), pages 520–524. IEEE, 2024.
Publicado
30/09/2024
TABOSA, Davi; VIANA, Windson; ROCHA, Lincoln. Atoms of Confusion in the Android Open Source Project: A Prevalence Study. In: WORKSHOP DE VISUALIZAÇÃO, EVOLUÇÃO E MANUTENÇÃO DE SOFTWARE (VEM), 12. , 2024, Curitiba/PR. Anais [...]. Porto Alegre: Sociedade Brasileira de Computação, 2024 . p. 35-44. DOI: https://doi.org/10.5753/vem.2024.3840.