Contextual Similarity Among Identifier Names: An Empirical Study - Gresta, Remo; Cirilo, Elder (Anais do Workshop de Visualização, Evolução e Manutenção de Software (VEM); 2020: Anais do VIII Workshop de Visualização, Evolução e Manutenção de Software, 2020)
Identifiers are one of the most important sources of domain information in software development. Therefore, it is recognized that the proper use of names directly impacts the code's comprehensibility, maintainability, and quality. Our goal in this work is to expand the current knowledge about names by considering not only their quality but also their contextual similarity. To achieve that, we extracted names of four large scale open-source projects written in Java. Then, we computed the semantic similarity between classes and their attributes/variables using Fasttext, an word embedding algorithm. As a result, we could observe that source code, in general, preserve an acceptable level of contextual similarity, developers avoid to use names out of the default dictionary (e.g., domain), and files with more changes and maintained by distinct contributors tend to have better a contextual similarity.