【24h】

Using software metrics to select refactoring for long method bad smell

机译:使用软件指标来选择重构方法,以消除长时间的异味

获取原文

摘要

Refactoring is a technique for improving software structure without changing its behavior which can be used to remove bad smells and increases software maintainability. But only few approaches have been proposed to address the identification of appropriate refactorings. Specifically, our research proposes a method to select refactoring based on software metrics which are defined in terms of data flow and control flow graphs. The method consist of 4 steps: 1) calculate metrics, 2) find candidate refactoring by using refactoring filtering condition (RFC), 3) apply a suite of candidate refactorings and compute maintainability, and 4) identify the refactoring that gives the highest maintainability. We demonstrate out approach by giving an example of removing a long method bad smell in a customer class in a movie rental system. Our approach proves to be able to suggest an appropriate set of refactoring techniques such as extract method, replace temp with query, and decompose condition, to solve the long method bad smell.
机译:重构是一种在不更改软件性能的情况下改善其软件结构的技术,该技术可用于消除不良气味并提高软件可维护性。但是,仅提出了几种方法来解决适当重构的识别问题。具体来说,我们的研究提出了一种基于软件指标来选择重构的方法,这些指标是根据数据流和控制流图定义的。该方法包括4个步骤:1)计算指标,2)通过使用重构过滤条件(RFC)查找候选重构,3)应用一组候选重构并计算可维护性,以及4)识别可提供最高可维护性的重构。我们通过举例说明消除电影租借系统中客户类别中的长效不良气味的方法,演示了这种方法。我们的方法证明可以提出一组适当的重构技术,例如提取方法,用查询替换temp以及分解条件,以解决长方法产生的难闻气味。

著录项

相似文献

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

客服邮箱:kefu@zhangqiaokeyan.com

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

  • 服务号