首页> 外文会议>Software quality days conference;SWQD >Deriving Extract Method Refactoring Suggestions for Long Methods
【24h】

Deriving Extract Method Refactoring Suggestions for Long Methods

机译:得出长方法的提取方法重构建议

获取原文

摘要

The extract method is a common way to shorten long methods in software development. Before developers can use tools that support the extract method, they need to invest time in identifying a suitable refactoring candidate. This paper addresses the problem of finding the most appropriate refactoring candidate for long methods written in Java. The approach determines valid refactoring candidates and ranks them using a scoring function that aims to improve readability and reduce code complexity. We use length and nesting reduction as complexity indicators. The number of parameters needed by the candidate influences the score. To suggest candidates that axe consistent with the structure of the code, information such as comments and blank lines are also considered by the scoring function. We evaluate our approach to three open source systems using a user study with ten experienced developers. Our results show that they would actually apply 86 % of suggestions for an extract method refactoring.
机译:提取方法是缩短软件开发中冗长方法的常用方法。在开发人员可以使用支持提取方法的工具之前,他们需要花费时间来确定合适的重构候选对象。本文解决了为用Java编写的长方法找到最合适的重构候选者的问题。该方法确定有效的重构候选者,并使用评分函数对它们进行排名,该评分函数旨在提高可读性并降低代码复杂性。我们使用长度减少和嵌套减少作为复杂性指标。候选人所需的参数数量会影响分数。为了建议与代码结构一致的候选者,评分功能还考虑了诸如注释和空白行之类的信息。我们通过与十位经验丰富的开发人员进行的用户研究,评估了我们针对三种开源系统的方法。我们的结果表明,他们实际上将86%的建议应用于提取方法重构。

著录项

相似文献

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

客服邮箱:kefu@zhangqiaokeyan.com

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

  • 服务号