Design Defects Detection and Correction by Example

  • Authors:
  • Marouane Kessentini;Wael Kessentini;Houari Sahraoui;Mounir Boukadoum;Ali Ouni

  • Affiliations:
  • -;-;-;-;-

  • Venue:
  • ICPC '11 Proceedings of the 2011 IEEE 19th International Conference on Program Comprehension
  • Year:
  • 2011

Quantified Score

Hi-index 0.00

Visualization

Abstract

Detecting and fixing defects make programs easier to understand by developers. We propose an automated approach for the detection and correction of various types of design defects in source code. Our approach allows to automatically find detection rules, thus relieving the designer from doing so manually. Rules are defined as combinations of metrics/thresholds that better conform to known instances of design defects (defect examples). The correction solutions, a combination of refactoring operations, should minimize, as much as possible, the number of defects detected using the detection rules. In our setting, we use genetic programming for rule extraction. For the correction step, we use genetic algorithm. We evaluate our approach by finding and fixing potential defects in four open-source systems. For all these systems, we found, in average, more than 80% of known defects, a better result when compared to a state-of-the-art approach, where the detection rules are manually or semi-automatically specified. The proposed corrections fix, in average, more than 78%of detected defects.