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

耦合与重构关系的实证研究

On the Relationship Between Coupling and Refactoring: An Empirical Viewpoint

Steve Counsell, Mahir Arzoky, Giuseppe Destefanis, Davide Taibi

摘要:

[背景]重构在过去的二十年中已经成熟,成为开发人员工具包的一部分。然而,许多基础研究问题仍然在很大程度上未被探索。[Aim]本文的目标是调查的最高和最低的四分位数的重构为基础的数据使用两个耦合度量-对象之间的耦合度量和最近的概念耦合类之间的度量来回答这个问题。重构的趋势和模式可以根据类耦合的级别来识别吗?[方法]在本文中,我们分析了从三个开源系统的发布中提取的六千多个重构操作,以解决这样一个问题。[结果]结果显示,对于两个指标,在耦合的上四分位数或下四分位数中应用的重构类型没有有意义的差异;在某些情况下,通常与耦合去除相关的重构实际上在下四分位数中更多。还注意到所有系统都缺乏与继承相关的重构。[结论]新出现的消息(也是令人困惑的消息)是,当涉及到重构类型时,开发人员似乎对高耦合的类漠不关心-他们以几乎相同的方式对待相对低耦合的类。

英文摘要:

[Background] Refactoring has matured over the past twenty years to become part of a developer's toolkit. However, many fundamental research questions still remain largely unexplored. [Aim] The goal of this paper is to investigate the highest and lowest quartile of refactoring-based data using two coupling metrics - the Coupling between Objects metric and the more recent Conceptual Coupling between Classes metric to answer this question. Can refactoring trends and patterns be identified based on the level of class coupling? [Method] In this paper, we analyze over six thousand refactoring operations drawn from releases of three open-source systems to address one such question. [Results] Results showed no meaningful difference in the types of refactoring applied across either lower or upper quartile of coupling for both metrics; refactorings usually associated with coupling removal were actually more numerous in the lower quartile in some cases. A lack of inheritance-related refactorings across all systems was also noted. [Conclusions] The emerging message (and a perplexing one) is that developers seem to be largely indifferent to classes with high coupling when it comes to refactoring types - they treat classes with relatively low coupling in almost the same way.

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

↑