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.
翻译:标识符名称在程序理解活动中起着重要作用,高质量名称能提升开发人员生产力与系统质量。为修正低质量名称,开发人员会重命名标识符以使其更准确反映预期用途。然而,重命名并不总能产生高质量且持久有效的名称——在许多情况下,开发人员在系统生命周期内会对同一标识符执行多次重命名操作。本文通过大规模实证研究,考察了经历多次重命名的标识符(即重命名链)的发生规律。研究结果显示,几乎所有项目中都存在重命名链现象,其中方法类型的重命名链数量通常多于其他标识符类型。此外,同一重命名链中的所有重命名操作通常由同一位开发人员完成,且多数名称保持相同的语法结构。理解重命名链有助于我们为构建高质量、持久有效的标识符提供更强有力的指导建议和针对性研究。