Computer Science ›› 2022, Vol. 49 ›› Issue (11): 55-64.doi: 10.11896/jsjkx.220300058

• Computer Software • Previous Articles     Next Articles

Study on Effectiveness of Quality Objectives and Non-quality Objectives for Automated Software Refactoring

GUO Ya-lin, LI Xiao-chen, REN Zhi-lei, JIANG He   

  1. School of Software,Dalian University of Technology,Dalian,Liaoning 116600,China
  • Received:2022-03-07 Revised:2022-04-30 Online:2022-11-15 Published:2022-11-03
  • About author:GUO Ya-lin,born in 1996,postgra-duate,is a student member of China Computer Federation.Her main research interests include multi-objective optimization and software refactoring.
    LI Xiao-chen,born in 1989,Ph.D,asso-ciate professor,is a member of China Computer Federation.His main research interests include evolutionary computation,intelligent software engineering,open-source software engineering,and data analysis in software engineering.

Abstract: The cost of software maintenance increases as the continuous iterative development of software.To reduce this cost,automated software refactoring is proven to be an effective solution.One of the most typical automated software refactoring approaches is the search-based refactoring.This approach refactors software according to some predefined objectives.Existing stu-dies show that the selection of objectives plays a decisive role in the search process.Although many quality objectives and non-quality objectives are proposed,there is no research to analyze that in the same evaluation framework which objectives can guide the software refactoring to achieve results that meet developers’ expectations.Meanwhile,whether the combination of quality objectives and non-quality objectives will have better results is not analyzed.To answer these questions,this paper designs a search-based multi-objective software refactoring evaluation framework.Under the framework,this paper investigates the impact of the combination of seven different objectives on software refactoring with six open-source software projects in different scales;the software quality before and after refactoring is evaluated using a variety of indicators,and the effectiveness of different objective combinations is also analyzed.Experimental results show that the combination of quality objectives and non-quality objectives can better improve the effectiveness of software refactoring than using one single type of objectives,and the combination of the ‘qua-lity’ objective and the ‘similarity with recorded code changes’ objective is important to the improvement of software refactoring effectiveness.

Key words: Software refactoring, Multi-objective optimization, Software quality, Search-based software engineering, Software maintenance

CLC Number: 

  • TP311
[1]BROWN W H,MALVEAU R C,MCCOR-MICK H W S,et al.AntiPatterns:refactoring software,architectures,and projects in crisis [M].John Wiley & Sons,Inc.,1998.
[2]ERLIKH L.Leveraging legacy system dollars for e-business[J].IT Professional,2000,2(3):17-23.
[3]BELL D.Software Engineering:A Programming Approach[M].Hoboken:Addison Wesley,2000.
[4]OPDYKE W,JOHNSON R.Refactoring:An Aid in DesigningApplication Frameworks and Evolving Object-Oriented Systems[C]//Proceedings of the Symposium on Object Oriented Programming Emphasizing Practical Applications(Sooppa’90 ).1990:145-161.
[5]MKAOUER M W,KESSENTINI M,BECH-IKH S,et al.High dimensional search-based software engineering:finding tradeoffs among 15 objectives for automating software refactoring using NSGA-III[C]//Proceedings of the 2014 Annual Conference on Genetic and Evolutionary Computation.2014:1263-1270.
[6]OUNI A,KESSENTINI M,SAHRAOUI H,et al.Multi-criteria code refactoring using search-based software engineering:An industrial case study [J].ACM Transactions on Software Engineering and Methodology(TOSEM),2016,25(3):1-53.
[7]MOHAN M,GREER D.A survey of search-based refactoring for software maintenance[J].Journal of Software Engineering Research and Development,2018,6(1):1-52.
[8]WU N,SONG F M,LI X D.Quantum search-based software engineering:An exploratory study[J].SCIENTIA SINICA Informationis,2015,45(5):623-633.
[9]MARIANI T,VERGILIO S R.A systematic review on search-based refactoring[J].Information and Software Technology,2017,83:14-34.
[10]OUNI A,KESSENTINI M,SAHRAOUI H,et al.Maintain-ability defects detection and correction:A multi-objective approach [J].Automated Software Engineering,2013,20(1):47-79.
[11]ALIZADEH V,KESSENTINI M,MKAOU-ER M W,et al.An interactive and dynamic search-based approach to software refactoring recommenda-tions[J].IEEE Transactions on Software Engineering,2018,46(9):932-961.
[12]MENS T,TOURWE T.A survey of software refactoring[J].IEEE Transactions on Software Engineering,2004,30(2):126-139.
[13]FOWLER M.Refactoring:improving the design of existing code[M].Hoboken:Addison-Wesley Professional,2018.
[14]SENG O,STAMMEL J,BURKHART D.Search-based determination of refactorings for improving the class structure of object-oriented systems[C]//Proceedings of the 8th Annual Conferen-ce on Genetic and Evolutionary Computation.2006:1909-1916.
[15]KESSENTINI M,KESSENTINI W,SAHRA-OUI H,et al.Design defects detection and correction by example[C]//2011 IEEE 19th International Conference on Program Comprehension.IEEE,2011:81-90.
[16]PRADITWONG K,HARMAN M,YAO X.Software moduleclustering as a multi-objective search problem[J].IEEE Transa-ctions on Software Engineering,2010,37(2):264-282.
[17]HARMAN M,HIERONS R M,PROCTOR M.A New Representation and Crossover Operator for Search-based Optimization of Software Modularization [C]//GECCO.2002:1351-1358.
[18]BAVOTA G,CARNEVALE F,DE LUCIA A,et al.Putting the developer in-the-loop:an interactive GA for software remodula-rization[C]//International Symposium on Search Based Software Engineering.Berlin:Springer,2012:75-89.
[19]OUNI A,KESSENTINI M,SAHRAOUI H,et al.The use of development history in software refactoring using a multi-objective evolutionary algorithm[C]//Proceedings of the 15th annual conference on Genetic and evolutionary computation.2013:1461-1468.
[20]BANSIYA J,DAVIS C G.A hierarchical model for object-oriented design quality assessment [J].IEEE Transactions on Software Engineering,2002,28(1):4-17.
[21]O’KEEFFE M,CINNÉIDE M O.Search-based refactoring for software maintenance[J].Journal of Systems and Software,2008,81(4):502-516.
[22]MOHAN M,GREER D.Using a Many-Objective Approach to Investigate Automated Refactoring [J].Information & Software Technology,2019,112:83-101.
[23]FERNANDES E,CHÁVEZ A,GARCIA A,et al.Refactoring effect on internal quality attributes:What haven’t they told you yet? [J].Information and Software Technology,2020,126:106347.
[24]ABID C,KESSENTINI M,ALIZADEH V,et al.How DoesRefactoring Impact Security When Improving Quality?A Security-Aware Refactoring Approach[J].IEEE Transactions on Software Engineering,2022,48(3):864-878.
[25]OUNI A,KESSENTINI M,SAHRAOUI H,et al.Improvingmulti-objective code-smells correction using development history[J].Journal of Systems and Software,2015,105:18-39.
[26]MKAOUER M W,KESSENTINI M,BECHIKH S,et al.Recom-
mendation system for software refactoring using innovization and interactive dynamic optimization[C]//Proceedings of the 29th ACM/IEEE International Conference on Automated Soft-ware Engineering.2014:331-336.
[27]JENSEN A C,CHENG B H C.On the use of genetic programming for automated refactoring and the introduction of design patterns[C]//Proceedings of the 12th Annual Conference on Genetic and Evolutionary Computation.2010:1341-1348.
[28]MKAOUER W,KESSENTINI M,SHAOUT A,et al.Many-objective software remodularization using NSGA-III [J].ACM Transactions on Software Engineering and Methodology(TOSEM),2015,24(3):1-45.
[29]GHANNEM A,BOUSSAIDI G E,KESSENTINI M.Modelrefactoring using interactive genetic algorithm[C]//Interna-tional Symposium on Search Based Software Engineering.Berlin:Springer,2013:96-110.
[30]ABID C,ALIZADEH V,KESSENTINI M,et al.Prioritizingrefactorings for security-critical code[J].Automated Software Engineering,2021,28(2):1-28.
[31]KESSENTINI M,KESSENTINI W,SAHRA-OUI H,et al.Design defects detection and correction by example[C]//2011 IEEE 19th International Conference on Program Comprehension.IEEE,2011:81-90.
[32]DEB K,SAXENA D.Searching for Pareto-optimal solutionsthrough dimensionality reduction for certain large-dimensional multi-objective optimization problems[C]//Proceedings of the World Congress on Computational Intelligence(WCCI-2006).2006:3352-3360.
[1] XIONG Luo-geng, ZHENG Shang, ZOU Hai-tao, YU Hua-long, GAO Shang. Software Self-admitted Technical Debt Identification with Bidirectional Gate Recurrent Unit and Attention Mechanism [J]. Computer Science, 2022, 49(7): 212-219.
[2] SUN Gang, WU Jiang-jiang, CHEN Hao, LI Jun, XU Shi-yuan. Hidden Preference-based Multi-objective Evolutionary Algorithm Based on Chebyshev Distance [J]. Computer Science, 2022, 49(6): 297-304.
[3] LI Hao-dong, HU Jie, FAN Qin-qin. Multimodal Multi-objective Optimization Based on Parallel Zoning Search and Its Application [J]. Computer Science, 2022, 49(5): 212-220.
[4] PENG Dong-yang, WANG Rui, HU Gu-yu, ZU Jia-chen, WANG Tian-feng. Fair Joint Optimization of QoE and Energy Efficiency in Caching Strategy for Videos [J]. Computer Science, 2022, 49(4): 312-320.
[5] GUAN Zheng, DENG Yang-lin, NIE Ren-can. Non-negative Matrix Factorization Based on Spectral Reconstruction Constraint for Hyperspectral and Panchromatic Image Fusion [J]. Computer Science, 2021, 48(9): 153-159.
[6] ZHANG Jiu-jie, CHEN Chao, NIE Hong-xuan, XIA Yu-qin, ZHANG Li-ping, MA Zhan-fei. Empirical Study on Stability of Clone Code Sets Based on Class Granularity [J]. Computer Science, 2021, 48(5): 75-85.
[7] MI Qing, GUO Li-min, CHEN Jun-cheng. Code Readability Assessment Method Based on Multidimensional Features and Hybrid Neural Networks [J]. Computer Science, 2021, 48(12): 94-99.
[8] WANG Ke, QU Hua, ZHAO Ji-hong. Multi-objective Optimization Method Based on Reinforcement Learning in Multi-domain SFC Deployment [J]. Computer Science, 2021, 48(12): 324-330.
[9] CUI Guo-nan, WANG Li-song, KANG Jie-xiang, GAO Zhong-jie, WANG Hui, YIN Wei. Fuzzy Clustering Validity Index Combined with Multi-objective Optimization Algorithm and Its Application [J]. Computer Science, 2021, 48(10): 197-203.
[10] ZHU Han-qing, MA Wu-bin, ZHOU Hao-hao, WU Ya-hui, HUANG Hong-bin. Microservices User Requests Allocation Strategy Based on Improved Multi-objective Evolutionary Algorithms [J]. Computer Science, 2021, 48(10): 343-350.
[11] ZHANG Qing-qi, LIU Man-dan. Multi-objective Five-elements Cycle Optimization Algorithm for Complex Network Community Discovery [J]. Computer Science, 2020, 47(8): 284-290.
[12] ZHENG You-lian, LEI De-ming, ZHENG Qiao-xian. Novel Artificial Bee Colony Algorithm for Solving Many-objective Scheduling [J]. Computer Science, 2020, 47(7): 186-191.
[13] ZHAO Song-hui, REN Zhi-lei, JIANG He. Multi-objective Optimization Methods for Software Upgradeability Problem [J]. Computer Science, 2020, 47(6): 16-23.
[14] XIA Chun-yan, WANG Xing-ya, ZHANG Yan. Test Case Prioritization Based on Multi-objective Optimization [J]. Computer Science, 2020, 47(6): 38-43.
[15] SUN Min, CHEN Zhong-xiong, YE Qiao-nan. Workflow Scheduling Strategy Based on HEDSM Under Cloud Environment [J]. Computer Science, 2020, 47(6): 252-259.
Viewed
Full text


Abstract

Cited

  Shared   
  Discussed   
No Suggested Reading articles found!