论文标题
共同命名标识符的经验研究
Empirical Study of Co-Renamed Identifiers
论文作者
论文摘要
背景:程序标识符的重命名是最常见的重构操作。由于某些标识符相互关联,因此开发人员可能需要将相关标识符重命名。目的:要了解开发人员如何同时重命名多个标识符,有必要考虑程序中标识符与非相同但语义上相似标识符的简短匹配之间的关系。方法:我们研究了共同命名的标识符之间的关系,并确定其关系的类型,这些类型有助于使用从开源软件项目的历史中收集的超过1M的重命名实例改善建议。我们还评估并比较了共同命名的影响以及当考虑标识符中的单词中发生变化时的标识符之间的关系。结果:我们揭示了在同名标识符中经常发现的标识符的几个关系,例如同一类中的方法的标识符或定义变量的标识符,并用于初始化变量的标识符,具体取决于重命名的标识符的类型。另外,考虑拐点并不影响关系的趋势。结论:这些结果提出了一种方法,该方法将标识符优先考虑,具体取决于其类型和更名的标识符类型。
Background: The renaming of program identifiers is the most common refactoring operation. Because some identifiers are related to each other, developers may need to rename related identifiers together. Aims: To understand how developers rename multiple identifiers simultaneously, it is necessary to consider the relationships between identifiers in the program and the brief matching for non-identical but semantically similar identifiers. Method: We investigate the relationships between co-renamed identifiers and identify the types of their relationships that contribute to improving the recommendation using more than 1M of renaming instances collected from the histories of open-source software projects. We also evaluate and compare the impact of co-renaming and the relationships between identifiers when inflections occur in the words in identifiers are taken into account. Results: We revealed several relationships of identifiers that are frequently found in the co-renamed identifiers, such as the identifiers of methods in the same class or an identifier defining a variable and another used for initializing the variable, depending on the type of the renamed identifiers. Additionally, the consideration of inflections did not affect the tendency of the relationships. Conclusion: These results suggest an approach that prioritizes the identifiers to be recommended depending on their types and the type of the renamed identifier.