Understanding Class Name Regularity: A Simple Heuristic and Supportive Visualization

Autor: Nour Jihene Agouf, Stéphane Ducasse, Anne Etien, Abdelghani Alidra, Arnaud Thiefaine
Přispěvatelé: Arolla, Analyses and Languages Constructs for Object-Oriented Application Evolution (RMOD), Inria Lille - Nord Europe, Institut National de Recherche en Informatique et en Automatique (Inria)-Institut National de Recherche en Informatique et en Automatique (Inria)-Centre de Recherche en Informatique, Signal et Automatique de Lille - UMR 9189 (CRIStAL), Centrale Lille-Université de Lille-Centre National de la Recherche Scientifique (CNRS)-Centrale Lille-Université de Lille-Centre National de la Recherche Scientifique (CNRS), Université de Lille, CPER DATA3
Jazyk: angličtina
Rok vydání: 2022
Předmět:
Zdroj: The Journal of Object Technology
The Journal of Object Technology, 2022, 21, ⟨10.5381/jot.2022.21.1.a2⟩
ISSN: 1660-1769
Popis: International audience; Studies have shown that more than 50% of software maintenance time is spent reading code to understand it. This puts a strong emphasis on the understandability of source code. Class names constitute one of the first pieces of information developers have access to. Proposal: To assist developers in understanding the logic and regularity of class names, we present a new and simple visualization, called ClassName Distribution. It brings together package and inheritance as structural perspectives on class names. ClassName Distribution allows one to spot naming irregularities in large hierarchies scattered over multiple packages. Validation: We show (1) how this visualization helps capture recurrent patterns relative to concept reference in class names and (2) that this visualization supports the evolution of software systems by monitoring and guiding class renamings over multiple versions. To evaluate our approach we did a consequent assessment with real practitioners and open-source software structured in two different setups: in the first one, we asked domain experts to use the visualization: three groups of engineers applied our tool to the the software they develop or maintain. They proposed and performed respectively 91, 68, and 24 class renamings. In the second setup, as authors of the visualization and the tool (visualization experts), we applied our tool to a new UI framework for Pharo. We sent 34 pull requests for renaming classes and 32 were accepted. Finally, we applied our visualizations to 50 Java projects and identified visual patterns in most of them. Consequently, it shows that the proposed visualization is effective for spotting class name inconsistencies, and this by both developers of the system and external persons. The visualization presented in this article has been designed with colors, therefore the paper should be printed using an adequate medium or be read digitally.
Databáze: OpenAIRE