Software Refactoring is the process of restructuring existing code to improve software quality while preserving existing behavior. In many cases, multiple refactorings must be applied together to correct quality issues such as code smells. While such collections of refactorings include refactorings that depend on other refactorings (i.e., one cannot be applied without also applying another), existing refactoring recommendation tools generate solutions that include invalid refactorings because they do not account for dependencies among refactorings. Consequently, developers prefer manually applying refactorings to using such tools. A key contributor to this problem is that search-based refactoring approaches, which are widely adopted to recommend refactorings, employ random change operators (e.g., crossover and mutation) to evolve solutions without considering the dependencies among refactorings. In this paper, we propose intelligent change operators and integrate them into a multi-objective search algorithm to recommend valid refactorings that address conflicting quality objectives. The proposed intelligent crossover and mutation operators incorporate refactoring dependencies to avoid creating invalid refactorings or invalidating existing refactorings. Further, the intelligent crossover operator is augmented to create offspring that improve solution quality by exchanging blocks of valid refactorings that improve a solution’s weakest objectives. We used our intelligent change operators to generate refactoring recommendations for four widely used open-source projects. The results show that our intelligent change operators improve the diversity of solutions, accelerate solution convergence, reduce the number of invalid refactorings by up to 71.52% compared to existing search-based refactoring approaches, and increase the quality of the solutions. Our approach outperformed the state-of-the-art search-based refactoring approaches and an existing deterministic refactoring tool based on manual validation by developers with an average manual correctness, precision and recall of 0.89, 0.82, and 0.87.
Thu 18 NovDisplayed time zone: Hobart change
12:00 - 13:00
|Intelligent Change Operators for Multi-Objective Refactoring|
|Refactorings and Technical Debt in Docker Projects: An Empirical Study|
|FixMe: A GitHub Bot for Detecting and Monitoring On-hold Self-Admitted Technical Debt|
Saranphon Phaithoon Mahidol University, Supakarn Wongnil Mahidol University, Patiphol Pussawong Mahidol University, Morakot Choetkiertikul Mahidol University, Thailand, Chaiyong Rakhitwetsagul Mahidol University, Thailand, Thanwadee Sunetnanta Mahidol University, Rungroj Maipradit Nara Institute of Science and Technology, Hideaki Hata Shinshu University, Kenichi Matsumoto Nara Institute of Science and TechnologyLink to publication DOI Pre-print Media Attached
|Automated Code Refactoring upon Database-Schema Changes in Web Applications|