Identifier names play a significant role in program comprehension activities, with high-quality names improving developer productivity and system quality. To correct poor-quality names, developers rename identifiers to reflect their intended purpose better. However, renames do not always result in high-quality, long-lasting names; in many cases, developers perform multiple rename operations on the same identifier throughout the system's lifetime. In this paper, we report on a large-scale empirical study that examines the occurrence of identifiers undergoing multiple renames (i.e., rename chains). Our findings show the presence of rename chains in almost every project, with methods typically having more rename chains than other identifier types. Furthermore, it is usually the same developer responsible for creating all renames within a chain, with most names maintaining the same grammatical structure. Understanding rename chains can help us provide stronger advice, and targeted research, on how to craft high-quality, long-lasting identifiers.
翻译:标识符名称在程序理解活动中起着重要作用,高质量的命名能够提升开发者的工作效率和系统质量。为了纠正低质量的命名,开发者会对标识符进行重命名,以更好地反映其预期用途。然而,重命名并不总能产生高质量且持久的名称;在许多情况下,开发者会在系统的整个生命周期中对同一标识符执行多次重命名操作。本文通过一项大规模实证研究,考察了经历多次重命名(即重命名链)的标识符的出现情况。研究结果表明,几乎所有项目都存在重命名链,其中方法通常比其他类型的标识符拥有更多的重命名链。此外,链中的所有重命名通常由同一位开发者完成,且大多数名称保持相同的语法结构。理解重命名链有助于我们提供更具针对性的建议和定向研究,从而指导如何打造高质量、持久的标识符。