arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2107.09512cs.SE
收藏

论气味大类、复杂类与重码的相互作用

On the Interplay of Smells Large Class, Complex Class and Duplicate Code

Elder Vicente de Paulo Sobrinho, Marcelo de Almeida Maia

摘要:

坏味道被定义为描述代码中的潜在问题,可能指出重构的机会。一些实证研究强调,气味对理解和可维护性有负面影响。因此,已经提出了几种方法来检测和重组它们。然而,在源代码中不同类型的气味发生的相互关系的研究仍然缺乏,特别是那些集中在这种相互关系的量化。在这项工作中,我们的目标是了解和量化的可能的相互关系的气味大类- LC,复杂的类- CC和重复代码- DC。特别是,我们调查模式的LC和CC的存在或不存在的重复代码。我们对五个开源项目进行了定量研究,并进行了定性分析,以测量和了解特定气味的关联。作为主要结果之一,我们强调,有“发生模式”之间的这些气味,例如:无论是在复杂类或在大类和复杂类的共同出现,克隆往往是更普遍的高度复杂的类比不太复杂的类。发现的模式可以用于提高检测工具的性能,甚至有助于重构任务。

英文摘要:

Bad smells have been defined to describe potential problems in code, possibly pointing out refactoring opportunities. Several empirical studies have highlighted that smells have a negative impact on comprehension and maintainability. Consequently, several approaches have been proposed to detect and restructure them. However, studies on the inter-relationship of occurrence of different types of smells in source code are still lacking, especially those focused on the quantification of this inter-relationship. In this work, we aim at understand and quantify the possible the inter-relation of smells Large Class - LC, Complex Class - CC and Duplicate Code - DC. In particular, we investigate patterns of LC and CC regarding the presence or absence of duplicate code. We conduct a quantitative study on five open source projects, and also a qualitative analysis to measure and understand the association of specific smells. As one of the main results, we highlight that there are "occurrence patterns" among these smells, for example: either in Complex Class or in the co-occurrence of Large Class and Complex Class, clones tend to be more prevalent in highly complex classes than less complex classes. The found patterns could be used to improve the performance of detection tools or even help in refactoring tasks.

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

↑