Less is More: From Multi-Objective to Mono-Objective Refactoring via Developers Knowledge Extraction
Published in: 2019 19th International Working Conference on Source Code Analysis and Manipulation (SCAM)
Overview
There is a consensus in the software engineering literature that improving software quality will involve making trade-offs between conflicting objectives. However, existing refactoring approaches face significant challenges in handling these trade-offs effectively.
The Challenge
Current refactoring approaches fall into two main categories, each with distinct limitations:
Category 1: Aggregated Metrics
- Challenge: Defining upfront weights for quality objectives
- Problem: Developers cannot express preferences upfront without seeing the solutions
Category 2: Multi-Objective Trade-offs
- Challenge: Large number of possible trade-offs between quality objectives
- Problem: Developers become reluctant to examine many refactoring solutions
Our Innovation: "Less is More"
For the first time, we propose a way to convert multi-objective search into mono-objective search after few interactions with developers to identify good refactoring solutions based on their preferences.
Approach Overview

Our three-step approach: Multi-objective exploration → Clustering & interaction → Mono-objective transformation
Our three-step methodology transforms the complexity of multi-objective optimization into a simplified, developer-friendly mono-objective approach:
Step 1: Multi-Objective Exploration
- Generate different possible refactoring strategies
- Find trade-offs between several conflicting quality attributes
- Create a comprehensive Pareto front of solutions
Step 2: Intelligent Clustering & Developer Interaction
- Use unsupervised learning to cluster the Pareto front solutions
- Guide developers in selecting their region of interest
- Significantly reduce the number of refactoring options to explore
Step 3: Mono-Objective Transformation
- Extract preferences from developer interactions
- Transform multi-objective search into mono-objective search
- Use preferred cluster as initial population
- Generate evaluation function based on automatically computed weights
- Result: Developer interacts with only ONE refactoring solution
Key Innovation
🎯 Automatic Weight Computation: Weights are automatically computed from the position of the preferred cluster in the Pareto front, eliminating the need for developers to specify preferences upfront.
Evaluation Results
We conducted a comprehensive evaluation with 32 participants on 6 open source projects and 1 industrial project.
Key Findings:
- ✅ Higher Accuracy: Recommended refactorings are more accurate than current state-of-the-art
- ✅ Reduced Complexity: Developers interact with only one solution instead of many
- ✅ Preference Learning: System learns and applies developer preferences automatically
- ✅ Scalable Approach: Works effectively on both open source and industrial projects
Tool Demonstration
Check out our tool demonstration video:
Resources
🔗 Publication Website: https://sites.google.com/view/scam2019
Abstract
There is a consensus in the software engineering literature that improving software quality will involve making trade-offs between conflicting objectives. Thus, refactoring studies either aggregated these quality metrics to evaluate possible code changes or treated them separately to find trade-offs. For the first category of work, it is challenging to define upfront the weights for the quality objectives since developers are not able to express them upfront. For the second category of work, the number of possible trade-offs between quality objectives is large which make developers reluctant to look at many refactoring solutions.
In this paper, we propose, for the first time, a way to convert multi-objective search into a mono-objective one after few interactions with the developer to identify a good refactoring solution based on his preferences. The first step consists of using a multi-objective search to generate different possible refactoring strategies by finding a trade-off between several conflicting quality attributes. Then, an unsupervised learning algorithm clusters the different trade-off solutions, called the Pareto front, to guide the developers in selecting their region of interests and reduce the number of refactoring options to explore. Finally, the extracted preferences from the developer are used to transform the multi-objective search into a mono-objective one by taking the preferred cluster of the Pareto front as the initial population for the mono-objective search and generating an evaluation function based on the weights that are automatically computed from the position of the cluster in the Pareto front. Thus, the developer will just interact with only one refactoring solution generated by the mono-objective search. We selected 32 participants to manually evaluate the effectiveness of our tool on 6 open source projects and one industrial project. The results show that the recommended refactorings are more accurate than the current state of the art.
Technical Contributions
This research makes several significant contributions to the field:
1. Novel Search Strategy Transformation
- First approach to convert multi-objective search to mono-objective based on developer preferences
- Eliminates the complexity of handling multiple conflicting objectives
2. Automatic Weight Learning
- No need for developers to specify weights upfront
- Weights are learned from developer interactions and cluster positions
3. Preference Extraction Methodology
- Systematic approach to extract and formalize developer preferences
- Translates human intuition into algorithmic parameters
4. Scalable Interaction Model
- Reduces developer interaction from many solutions to just one
- Maintains solution quality while dramatically improving usability
Impact & Significance
This work bridges the gap between theoretical multi-objective optimization and practical software engineering:
- For Researchers: Provides a new paradigm for handling conflicting objectives in software engineering
- For Practitioners: Offers a practical tool that learns from developer expertise
- For Tool Developers: Demonstrates how AI can simplify complex optimization problems
Future Directions
The "Less is More" principle opens new research avenues:
- Application to other software engineering domains
- Extension to larger-scale industrial systems
- Integration with modern development workflows
- Real-time preference learning in IDEs
Interested in this research? Contact me or explore our other publications.