Skip to main navigation Skip to search Skip to main content

Une approche métaheuristique pour la restructuration automatique des classes dans les applications logicielles orientées objet

Translated title of the thesis: A meta-heuristic approach for automatic class restructuring in object-oriented software applications
  • Sabrine Boukharata

Student thesis: Master's thesisMaster in Engineering: Engineering

Abstract

Software systems evolve during their life cycle. Developers frequently add new features to satisfy customer needs or to correct some errors. However, these activities can increase system complexity and often cause code smells. Among these code smells, we find the God Class or Blob, which is a result of developers’ bad practices. Indeed, they place semantically unrelated methods in one single class which results in a complex and non-cohesive one. This can therefore cause problems of comprehensibility and maintainability for the class itself and the whole software. To improve the quality of software, the most used technique is refactoring, which consists of modifying its internal structure while preserving its external behavior. To fix blobs, the generally used refactoring operation is Extract class that allows the developer to split a large class into more cohesive ones implementing a single feature. To propose recommendations for class extraction, most of previous works have examined structural relationships between the class entities, while others have considered semantic similarity between methods. However, all these works ignore the history of code changes applied in the past. Additionally, all these researches present deterministic approaches that are inadequate to the problem due to the huge space of all the possible combinations of class members. Hence, the recommendation process is inherently an optimization problem. To deal with these limitations, we have developed an approach, named BlobBreak, which focuses on automating the Extract Class Refactoring operation using a meta-heuristic technique. We used a multi-objective algorithm to find the combinations of entities (methods and attributes) and extract them in new classes. Our approach combines different aspects of static and semantic dependencies as well as the history of code change. The solutions generated must be able to find a compromise between two objectives to (i) maximize the cohesion of the extracted classes and (ii) minimize the dependencies between the system classes. To evaluate our approach, we considered five Open Source projects with medium and large sizes. The obtained results show that BlobBreak improves the cohesion of the extracted classes as well as the quality of the studied projects. Additionally, the evaluation of BlobBreak’s efficiency showed that our approach outperforms JDeodorant, an existing approach, with a precision and recall of 78% and 77% respectively.
Date20 Dec 2019
Original languageFrench
Awarding Institution
  • École de technologie supérieure
SupervisorAli Ouni (Supervisor)

Cite this

'