Exploiting bad-smells and object-oriented characteristics to prioritize classes for refactoring

被引:5
作者
Malhotra, Ruchika [1 ]
Singh, Priya [1 ]
机构
[1] Delhi Technol Univ, Dept Software Engn, Delhi 110042, India
关键词
Bad-smells; Refactoring methods; Object-oriented characteristics; Software quality; Software maintenance; OPPORTUNITIES; QUALITY;
D O I
10.1007/s13198-020-01001-x
中图分类号
T [工业技术];
学科分类号
08 ;
摘要
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.
引用
收藏
页码:133 / 144
页数:12
相关论文
共 26 条
[1]  
Abreu F.B., 1994, P 4 INT C SOFTW QUAL, V186, P1, DOI DOI 10.5281/ZENODO.1217609
[2]   Constructing models for predicting extract subclass refactoring opportunities using object-oriented quality metrics [J].
Al Dallal, Jehad .
INFORMATION AND SOFTWARE TECHNOLOGY, 2012, 54 (10) :1125-1141
[3]  
[Anonymous], 2018, Refactoring: improving the design of existing code
[4]  
[Anonymous], 2016, P IEEE 24 INT C PROG, DOI [10.1109/ICPC.2016.7503705, DOI 10.1109/ICPC.2016.7503705]
[5]  
Castricini A, 2018, WATER RESOUR IRRIG M, V7, P1
[6]   Identifying Extract Method Refactoring Opportunities Based on Functional Relevance [J].
Charalampidou, Sofia ;
Ampatzoglou, Apostolos ;
Chatzigeorgiou, Alexander ;
Gkortzis, Antonios ;
Avgeriou, Paris .
IEEE TRANSACTIONS ON SOFTWARE ENGINEERING, 2017, 43 (10) :954-974
[7]   A METRICS SUITE FOR OBJECT-ORIENTED DESIGN [J].
CHIDAMBER, SR ;
KEMERER, CF .
IEEE TRANSACTIONS ON SOFTWARE ENGINEERING, 1994, 20 (06) :476-493
[8]  
Choudhary A, 2016, P 1 INT WORKSH TECHN
[9]   Predicting maintainability with object-oriented metrics - An empirical comparison [J].
Dagpinar, M ;
Jahnke, JH .
10TH WORKING CONFERENCE ON REVERSE ENGINEERING, PROCEEDINGS, 2003, :155-164
[10]   A Systematic Literature Review on Bad Smells-5 W's: Which, When, What, Who, Where [J].
de Paulo Sobrinho, Elder Vicente ;
De Lucia, Andrea ;
Maia, Marcelo de Almeida .
IEEE TRANSACTIONS ON SOFTWARE ENGINEERING, 2021, 47 (01) :17-66