DEPICTER: A Design-Principle Guided and Heuristic-Rule Constrained Software Refactoring Approach
Abstrak
Software refactoring is one of the most significant practices in software maintenance as the quality of software design tends to deteriorate during software evolution. But, refactoring software is a very challenging task as it requires a holistic view of the entire software system. To this end, recent studies introduced search-based algorithms to facilitate software refactoring. However, they still have the following major limitations: 1) the searched solutions may violate the design principles as their fitness functions do not directly reflect the degree of software’s compliance with design principles; 2) most approaches start the searching process from a completely random initial population, which may lead to unoptimal solutions. In this article, we aim to develop effective search-based refactoring approach to recommend better refactoring activities for developers which can improve the degree of software’s compliance with design principles as well as the software design quality. We propose DEPICTER, a design-principle guided and heuristic-rule constrained software refactoring recommendation approach. In particular, DEPICTER uses non-dominated sorting genetic algorithm (NSGA)-II genetic algorithm and employs design-principle metrics as fitness functions. Besides, DEPICTER leverages heuristic rules to improve the quality of initial population for subsequent generic evolution. Our evaluations, based on four widely used systems, show that DEPICTER is effective for guiding the development of better refactoring models in practice.
Artikel Ilmiah Terkait
Ghulam Muhammad Mazni Omar Zulfiqar Ali + 3 lainnya
2023
Refactoring has emerged as a predominant approach to augmenting software product quality. However, empirical evidence suggests that not all dimensions of software quality experience unending enhancements through refactoring. Current scholarly explorations reveal significant variances in the impacts of diverse refactoring methods, with potential adverse effects and contradictions surfacing concerning software quality. Consequently, such disparities render the advantages of refactoring contentious, culminating in challenges for software developers in the selection of optimal refactoring methods to ameliorate software quality. Existing literature lacks an in-depth exploration of the reasons behind the contrasting impacts of refactoring methods on quality enhancement or the development of refined protocols for employing these techniques. Therefore, this research aims to explore, identify, and fine-tune the utilization mechanisms of refactoring methods, empowering software developers to make informed choices for the enhancement of object-oriented systems’ quality attributes. Ten commonly employed refactoring methods were singled out for this investigation, each executed independently across five case studies varying in scale (small, medium, and large). The Quality Model for Object-Oriented Design (QMOOD) was employed as the evaluation tool to ascertain the influence of refactoring techniques on quality attributes. The research outcomes denote that the multifarious impacts of refactoring methods on quality attributes are attributed to distinct usage mechanisms of the techniques. These insights assist software practitioners in discerning the optimal utilization of refactoring methods to ameliorate software quality, taking their mechanisms into account. Moreover, these outcomes furnish industry experts with prescriptive guidelines for employing refactoring methods to elevate the quality of object-oriented systems, predicated on the suitable mechanism.
Sildemir S. da Silva Guilherme Pires Garcia L. F. Capretz + 3 lainnya
1 Oktober 2023
Nowadays, software testing professionals are commonly required to develop coding skills to work on test automation. One essential skill required from those who code is the ability to implement code refactoring, a valued quality aspect of software development; however, software developers usually encounter obstacles in successfully applying this practice. In this scenario, the present study aims to explore how software testing professionals (e.g., software testers, test engineers, test analysts, and software QAs) deal with code refactoring to understand the benefits and limitations of this practice in the context of software testing. We followed the guidelines to conduct surveys in software engineering and applied three sampling techniques, namely convenience sampling, purposive sampling, and snowballing sampling, to collect data from testing professionals. We received answers from 80 individuals reporting their experience refactoring the code of automated tests. We concluded that in the context of software testing, refactoring offers several benefits, such as supporting the maintenance of automated tests and improving the performance of the testing team. However, practitioners might encounter barriers in effectively implementing this practice, in particular, the lack of interest from managers and leaders. Our study raises discussions on the importance of having testing professionals implement refactoring in the code of automated tests, allowing them to improve their coding abilities.
Gulzar Mehmood K. Z. Zamli Fakhrud Din + 2 lainnya
23 Februari 2023
Swarm intelligence algorithms are metaheuristics inspired by the collective behavior of species such as birds, fish, bees, and ants. They are used in many optimization problems due to their simplicity, flexibility, and scalability. These algorithms get the desired convergence during the search by balancing the exploration and exploitation processes. These metaheuristics have applications in various domains such as global optimization, bioinformatics, power engineering, networking, machine learning, image processing, and environmental applications. This paper presents a systematic literature review (SLR) on applications of four swarm intelligence algorithms i.e., grey wolf optimization (GWO), whale optimization algorithms (WOA), Harris hawks optimizer (HHO), and moth-flame optimizer (MFO) in the field of software engineering. It presents an in-depth study of these metaheuristics’ adoption in the field of software engineering. This SLR is mainly comprised of three phases such as planning, conducting, and reporting. This study covers all related studies published from 2014 up to 2022. The study shows that applications of the selected metaheuristics have been utilized in various fields of software engineering especially software testing, software defect prediction, and software reliability. The study also points out some of the areas where applications of these swarm intelligence algorithms can be utilized. This study may act as a guideline for researchers in improving the current state-of-the-art on generally adopting these metaheuristics in software engineering.
Alessandro F. Garcia Publio Blenilio Caio Barbosa + 4 lainnya
1 September 2020
Software design is an important concern in modern code review through which multiple developers actively discuss and improve each single code change. However, there is little understanding of the impact of such developers’ reviews on continuously reducing design degradation over time. It is even less clear to what extent and how design degradation is reversed during the process of each single code change’s review. In summary, existing studies have not assessed how the process of design degradation evolution is impacted along: (i) within each single review, and (ii) across multiple reviews. As a consequence, one cannot understand how certain code review practices consistently contribute to either reduce or further increase design degradation as the project evolves. We aim at addressing these gaps through a multi-project retrospective study. By investigating 14,971 code reviews from seven software projects, we report the first study that characterizes how the process of design degradation evolves within each review and across multiple reviews. Moreover, we analyze a comprehensive suite of metrics to enable us to observe the influence of certain code review practices on combating or even accelerating design degradation. Our results show that the majority of code reviews had little to no design degradation impact in the analyzed projects. Even worse, this observation also applies, to some extent, to reviews with an explicit concern on design. Surprisingly, the practices of long discussions and high proportion of review disagreement in code reviews were found to increase design degradation. Finally, we also discuss how the study findings shed light on how to improve the research and practice of modern code review.
Federica Sarro
1 September 2023
This short paper accompanies the keynote given by Federica Sarro at the 31st IEEE International Requirements Engineering Conference, Hanover, Germany, September 2023.
Daftar Referensi
0 referensiTidak ada referensi ditemukan.
Artikel yang Mensitasi
0 sitasiTidak ada artikel yang mensitasi.