共同更名标识符的实证研究
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.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。