arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2408.09716cs.SE
收藏

RENAS:优先考虑标识符的共同重命名机会

RENAS: Prioritizing Co-Renaming Opportunities of Identifiers

Naoki Doi, Yuki Osumi, Shinpei Hayashi

AI总结:

研究提出RENAS技术,通过基于标识符关系和词汇相似性计算优先级得分,推荐Java应用中应同时重命名的相关标识符,相比现有方法F1-measure提升0.11以上。

摘要:

在源代码中重命名标识符是软件开发中常见的重构任务。当重命名一个标识符时,包含与该重命名相关的相同命名意图单词的其他标识符也应同时被重命名。然而,识别这些相关标识符具有挑战性。本研究引入了一种名为RENAS的技术,用于识别并推荐Java应用程序中应同时重命名的相关标识符。RENAS基于标识符之间的关系和相似性来确定重命名候选者的优先级得分。由于在源代码中具有关系和/或相似词汇的标识符通常会被一起重命名,其优先级得分基于这些因素确定。具有较高优先级的标识符被建议一起重命名。通过涉及从变更历史中提取并经人工验证的真实重命名实例的评估,与现有的重命名推荐方法相比,RENAS在F1-measure上提高了0.11以上。

英文摘要:

Renaming identifiers in source code is a common refactoring task in software development. When renaming an identifier, other identifiers containing words with the same naming intention related to the renaming should be renamed simultaneously. However, identifying these related identifiers can be challenging. This study introduces a technique called RENAS, which identifies and recommends related identifiers that should be renamed simultaneously in Java applications. RENAS determines priority scores for renaming candidates based on the relationships and similarities among identifiers. Since identifiers that have a relationship and/or have similar vocabulary in the source code are often renamed together, their priority scores are determined based on these factors. Identifiers with higher priority are recommended to be renamed together. Through an evaluation involving real renaming instances extracted from change histories and validated manually, RENAS demonstrated an improvement in the F1-measure by more than 0.11 compared with existing renaming recommendation approaches.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑