首页> 外文期刊>Software Engineering, IEEE Transactions on >Identifying Renaming Opportunities by Expanding Conducted Rename Refactorings
【24h】

Identifying Renaming Opportunities by Expanding Conducted Rename Refactorings

机译:通过扩展进行的重命名重构来识别重命名机会

获取原文
获取原文并翻译 | 示例

摘要

To facilitate software refactoring, a number of approaches and tools have been proposed to suggest where refactorings should be conducted. However, identification of such refactoring opportunities is usually difficult because it often involves difficult semantic analysis and it is often influenced by many factors besides source code. For example, whether a software entity should be renamed depends on the meaning of its original name (natural language understanding), the semantics of the entity (source code semantics), experience and preference of developers, and culture of companies. As a result, it is difficult to identify renaming opportunities. To this end, in this paper we propose an approach to identify renaming opportunities by expanding conducted renamings. Once a rename refactoring is conducted manually or with tool support, the proposed approach recommends to rename closely related software entities whose names are similar to that of the renamed entity. The rationale is that if an engineer makes a mistake in naming a software entity it is likely for her to make the same mistake in naming similar and closely related software entities. The main advantage of the proposed approach is that it does not involve difficult semantic analysis of source code or complex natural language understanding. Another advantage of this approach is that it is less influenced by subjective factors, e.g., experience and preference of software engineers. The proposed approach has been evaluated on four open-source applications. Our evaluation results show that the proposed approach is accurate in recommending entities to be renamed (average precision 82 percent) and in recommending new names for such entities (average precision 93 percent). Evaluation results also suggest that a substantial percentage (varying from 20 to 23 percent) of rename refactorings are expansible.
机译:为了促进软件重构,已经提出了许多方法和工具来建议应该在哪里进行重构。但是,识别这种重构机会通常很困难,因为它常常涉及到困难的语义分析,并且除了源代码外,还受许多因素的影响。例如,是否应重命名软件实体取决于其原始名称的含义(自然语言理解),实体的语义(源代码语义),开发人员的经验和偏好以及公司的文化。结果,很难识别重命名机会。为此,在本文中,我们提出了一种通过扩展进行的重命名来识别重命名机会的方法。一旦手动或在工具支持下进行重命名重构,建议的方法建议重命名名称与重命名实体相似的密切相关的软件实体。理由是,如果工程师在命名软件实体时犯了一个错误,那么她在命名相似且密切相关的软件实体时可能会犯同样的错误。所提出的方法的主要优点是它不涉及对源代码的困难语义分析或复杂的自然语言理解。这种方法的另一个优点是它不受主观因素(例如,软件工程师的经验和偏好)的影响。该提议的方法已经在四个开源应用程序上进行了评估。我们的评估结果表明,该方法在推荐要重命名的实体(平均精度为82%)和为此类实体推荐新名称(平均精度为93%)方面是准确的。评估结果还表明,很大一部分重命名重构(从20%到23%不等)是可扩展的。

著录项

相似文献

  • 外文文献
  • 中文文献
  • 专利
获取原文

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号