当前位置: X-MOL 学术Int. J. Syst. Assur. Eng. Manag. › 论文详情
Our official English website, www.x-mol.net, welcomes your feedback! (Note: you will need to create a separate account there.)
Exploiting bad-smells and object-oriented characteristics to prioritize classes for refactoring
International Journal of System Assurance Engineering and Management Pub Date : 2020-06-18 , DOI: 10.1007/s13198-020-01001-x
Ruchika Malhotra , Priya Singh

Bad-smell indicates code-design flaws and poor software-quality that weaken software design and inversely affects software development. It also works as a catalyst for bugs and failures in the software system. Refactoring methods are used by software practitioners as corrective actions for bad-smells. The problem relies in the fact that there are over seventy refactoring methods available in literature and multiple refactoring methods can be used to nullify the effect of a particular bad-smell. So, it becomes very difficult to apply refactoring on complete source-code and almost impossible if software size is dramatically large. Thus, there arises a need for prioritizing classes in some way. This study aims at applying refactoring solution to only severely affected classes to improve the overall software quality. We proposed a framework that detects a small subset of classes from the entire source-code instantly require refactoring. This prioritization of classes is based on two factors-severity of the presence of bad-smells and object-oriented characteristics. The approach is evaluated on eight open-source Java software systems using ten most common bad-smells and six widely known C&K metrics. Both these factors help in calculating a new metric Quality Depreciation Index Rule (QDIR) that exposes those classes that are highly affected by bad-smells and demand an immediate refactoring solution. Results of the empirical study indicate that QDIR is an effective metric to remove bad-smells in an environment of stringent time constraints and limited cost making the maintenance of software system easier and effective with enhanced software quality.

中文翻译:

利用不良气味和面向对象的特性对类进行优先排序以进行重构

不良气味表示代码设计缺陷和较差的软件质量,这些缺陷削弱了软件设计并反过来影响了软件开发。它还可以促进软件系统中的错误和故障。重构方法被软件从业人员用作对不良气味的纠正措施。问题在于以下事实:文献中提供了七十多种重构方法,并且可以使用多种重构方法来消除特定不良气味的影响。因此,将重构应用于完整的源代码变得非常困难,并且如果软件规模极大的话,几乎是不可能的。因此,需要以某种方式对类进行优先排序。本研究旨在将重构解决方案仅应用于严重受影响的类,以提高整体软件质量。我们提出了一个框架,该框架可立即从整个源代码中检测出一小部分类,因此需要进行重构。类的优先级排序基于两个因素:不良气味的严重性和面向对象的特征。该方法在使用十种最常见的不良气味和六种广为人知的C&K指标的八个开源Java软件系统上进行了评估。这两个因素都有助于计算新的度量标准“质量折旧指数规则”(QDIR),该规则可揭示那些受到不良气味严重影响的类别,并需要立即进行重构的解决方案。实证研究的结果表明,QDIR是在时间紧迫和成本有限的环境下消除不良气味的有效指标,使软件系统的维护更加轻松有效,并提高了软件质量。
更新日期:2020-06-18
down
wechat
bug