Filter by type:

Sort by year:

On the use of many quality attributes for software refactoring: a many-objective search-based software engineering approach

Mohamed Wiem MKaouer, Marouane Kessentini, Slim Bechikh, Mel Ó Cinnéide, Kalyanmoy Deb
Journal Empirical Software Engineering, Volume 21, Issue 6, December 2016, Pages 2503-2545

Abstract

Search-based software engineering (SBSE) solutions are still not scalable enough to handle high-dimensional objectives space. The majority of existing work treats software engineering problems from a single or bi-objective point of view, where the main goal is to maximize or minimize one or two objectives. However, most software engineering problems are naturally complex in which many conflicting objectives need to be optimized. Software refactoring is one of these problems involving finding a compromise between several quality attributes to improve the quality of the system while preserving the behavior. To this end, we propose a novel representation of the refactoring problem as a many-objective one where every quality attribute to improve is considered as an independent objective to be optimized. In our approach based on the recent NSGA-III algorithm, the refactoring solutions are evaluated using a set of 8 distinct objectives. We evaluated this approach on one industrial project and seven open source systems. We compared our findings to: several other many-objective techniques (IBEA, MOEA/D, GrEA, and DBEA-Eps), an existing multi-objective approach a mono-objective technique and an existing refactoring technique not based on heuristic search. Statistical analysis of our experiments over 31 runs shows the efficiency of our approach.

Interactive Code Smells Detection: An Initial Investigation

Mohamed Wiem Mkaouer
Workshop International Symposium on Search Based Software Engineering, pp. 281-287. Springer, 2016

Abstract

In this paper, we introduced a novel technique to generate more user-oriented detection rules by taking into account their feedback. Our techniques initially generate a set of detection rules that will be used to detect candidate code smells, these reported code smells will be exposed in an interactive fashion to the developer who will give his/her feedback by either approving or rejecting the identified code smell in the code fragment. This feedback will be fed to the GP as constraints and additional examples in order to converge towards more user-preferred detection rules. We initially investigated the detection of three types of code smells in four open source systems and reported that the interactive code smell detection achieves a precision of 89 % and recall on average when detecting infected classes. Results show that our approach can best imitate the user’s decision while omitting the complexity of manual tuning the detection rules.

High dimensional search-based software engineering: finding tradeoffs among 15 objectives for automating software refactoring using NSGA-III

Mohamed Wiem Mkaouer, Marouane Kessentini, Slim Bechikh, Kalyanmoy Deb, Mel Ó Cinnéide
Conference Proceedings of the 2014 Annual Conference on Genetic and Evolutionary Computation, Pages 1263-1270

Abstract

There is a growing need for scalable search-based software engineering approaches that address software engineering problems where a large number of objectives are to be optimized. Software refactoring is one of these problems where a refactoring sequence is sought that optimizes several software metrics. Most of the existing refactoring work uses a large set of quality metrics to evaluate the software design after applying refactoring operations, but current search-based software engineering approaches are limited to using a maximum of five metrics. We propose for the first time a scalable search-based software engineering approach based on a newly proposed evolutionary optimization method NSGA-III where there are 15 different objectives to be optimized. In our approach, automated refactoring solutions are evaluated using a set of 15 distinct quality metrics. We evaluated this approach on seven large open source systems and found that, on average, more than 92% of code smells were corrected. Statistical analysis of our experiments over 31 runs shows that NSGA-III performed significantly better than two other many-objective techniques (IBEA and MOEA/D), a multi-objective algorithm (NSGA-II) and two mono-objective approaches, hence demonstrating that our NSGA-III approach represents the new state of the art in fully-automated refactoring.

Recommendation system for software refactoring using innovization and interactive dynamic optimization

Mohamed Wiem Mkaouer, Marouane Kessentini, Slim Bechikh, Kalyanmoy Deb, Mel Ó Cinnéide
ConferenceIn Proceedings of the 29th ACM/IEEE international conference on Automated software engineering, pp. 331-336. ACM, 2014

Abstract

We propose a novel recommendation tool for software refactoring that dynamically adapts and suggests refactorings to developers interactively based on their feedback and introduced code changes. Our approach starts by finding upfront a set of non-dominated refactoring solutions using NSGA-II to improve software quality, reduce the number of refactorings and increase semantic coherence. The generated non-dominated refactoring solutions are analyzed using our innovization component to extract some interesting common features between them. Based on this analysis, the suggested refactorings are ranked and suggested to the developer one by one. The developer can approve, modify or reject each suggested refactoring, and this feedback is used to update the ranking of the suggested refactorings. After a number of introduced code changes, a local search is performed to update and adapt the set of refactoring solutions suggested by NSGA-II. We evaluated this tool on four large open source systems and one industrial project provided by our partner. Statistical analysis of our experiments over 31 runs shows that the dynamic refactoring approach performed significantly better than three other search-based refactoring techniques, manual refactorings, and one refactoring tool not based on heuristic search.

A robust multi-objective approach for software refactoring under uncertainty

Mohamed Wiem Mkaouer, Marouane Kessentini, Slim Bechikh, Mel Ó Cinnéide
ConferenceIn International Symposium on Search Based Software Engineering, pp. 168-183. Springer International Publishing, 2014

Abstract

Refactoring large systems involves several sources of uncertainty related to the severity levels of code smells to be corrected and the importance of the classes in which the smells are located. Due to the dynamic nature of software development, these values cannot be accurately determined in practice, leading to refactoring sequences that lack robustness. To address this problem, we introduced a multi-objective robust model, based on NSGA-II, for the software refactoring problem that tries to find the best trade-off between quality and robustness. We evaluated our approach using six open source systems and demonstrated that it is significantly better than state-of-the-art refactoring approaches in terms of robustness in 100% of experiments based on a variety of real-world scenarios. Our suggested refactoring solutions were found to be comparable in terms of quality to those suggested by existing approaches and to carry an acceptable robustness price. Our results also revealed an interesting feature about the trade-off between quality and robustness that demonstrates the practical value of taking robustness into account in software refactoring.

Model Transformation Using Multiobjective Optimization

Mohamed Wiem Mkaouer, Marouane Kessentini
Book Chapter Advances in Computers | January 1, 2014 | Volume 92 | 161-202
image

The evolution of languages and software architectures provides a strong motivation to migrate/transform existing software systems. Thus, more attention is paid to the transformation aspects in model-driven engineering (MDE) along with the growing importance of modeling in software development. However, a major concern in MDE is how to ensure the quality of the model transformation mechanisms. Most of existing work in model transformation has relied on defining languages to express transformation rules.

The main goal of existing transformation approaches is to provide rules generating target models, from source models, without errors. However, other important objective is how to minimize the complexity of transformation rules (e.g., the number of rules and number of matching in the same rule) while maximizing the quality of target models. In fact, reducing rule complexity and improving target model quality are important to (1) make rules and target models easy to understand and evolve, (2) find transformation errors easily, and (3) generate optimal target models. In this chapter, we consider the transformation mechanism as a multiobjective problem where the goal is to find the best rules maximizing target model quality and minimizing rule complexity. Our approach starts by randomly generating a set of rules, executing them to generate some target models. Of course, only solutions ensuring full correctness are considered during the optimization process. Then, the quality of the proposed solution (rules) is evaluated by (1) calculating the number of rules and matching metamodels in each rule and (2) assessing the quality of generated target models using a set of quality metrics. To this end, we use the nondominated sorting genetic algorithm (NSGA-II) to automatically generate the best transformation rules satisfying the two conflicting criteria. We report the results of our validation using three different transformation mechanisms. The best solutions provided well-designed target models with a minimal set of rules.

Preference-based multi-objective software modelling

Mohamed Wiem Mkaouer, Marouane Kessentini, Slim Bechikh, Daniel R. Tauritz
Workshop 1st International Workshop on Combining Modelling and Search-Based Software Engineering (CMSBSE@ICSE), 2013

Abstract

Refactoring large systems involves several sources of uncertainty related to the severity levels of code smells to be corrected and the importance of the classes in which the smells are located. Due to the dynamic nature of software development, these values cannot be accurately determined in practice, leading to refactoring sequences that lack robustness. To address this problem, we introduced a multi-objective robust model, based on NSGA-II, for the software refactoring problem that tries to find the best trade-off between quality and robustness. We evaluated our approach using six open source systems and demonstrated that it is significantly better than state-of-the-art refactoring approaches in terms of robustness in 100% of experiments based on a variety of real-world scenarios. Our suggested refactoring solutions were found to be comparable in terms of quality to those suggested by existing approaches and to carry an acceptable robustness price. Our results also revealed an interesting feature about the trade-off between quality and robustness that demonstrates the practical value of taking robustness into account in software refactoring.