【24h】

Detecting fragile comments

机译:检测脆弱的评论

获取原文

摘要

Refactoring is a common software development practice and many simple refactorings can be performed automatically by tools. Identifier renaming is a widely performed refactoring activity. With tool support, rename refactorings can rely on the program structure to ensure correctness of the code transformation. Unfortunately, the textual references to the renamed identifier present in the unstructured comment text cannot be formally detected through the syntax of the language, and are thus fragile with respect to identifier renaming. We designed a new rule-based approach to detect fragile comments. Our approach, called Fraco, takes into account the type of identifier, its morphology, the scope of the identifier and the location of comments. We evaluated the approach by comparing its precision and recall against hand-annotated benchmarks created for six target Java systems, and compared the results against the performance of Eclipse's automated in-comment identifier replacement feature. Fraco performed with near-optimal precision and recall on most components of our evaluation data set, and generally outperformed the baseline Eclipse feature. As part of our evaluation, we also noted that more than half of the total number of identifiers in our data set had fragile comments after renaming, which further motivates the need for research on automatic comment refactoring.
机译:重构是一种常见的软件开发实践,许多简单的重构可以由工具自动执行。标识符重命名是一项广泛执行的重构活动。借助工具支持,重命名重构可以依靠程序结构来确保代码转换的正确性。不幸的是,无法通过语言的语法来正式检测到非结构化注释文本中存在的对重命名标识符的文本引用,因此在标识符重命名方面比较脆弱。我们设计了一种基于规则的新方法来检测易碎评论。我们的方法称为Fraco,它考虑了标识符的类型,其形态,标识符的范围以及注释的位置。我们通过将方法的精确度和召回率与为六个目标Java系统创建的手动注释基准进行比较来评估该方法,并将结果与​​Eclipse的自动注释内标识符替换功能的性能进行了比较。 Fraco的性能几乎达到最佳,并且在我们评估数据集的大多数组件上都具有召回性,并且总体上胜过基线Eclipse功能。作为评估的一部分,我们还注意到,重命名后,数据集中标识符总数的一半以上具有脆弱的注释,这进一步激发了对自动注释重构进行研究的需求。

著录项

相似文献

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

客服邮箱:kefu@zhangqiaokeyan.com

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

  • 服务号