Deviance from perfection is a better criterion than closeness to evil when identifying risky code

  • Authors:
  • Marouane Kessentini;Stéphane Vaucher;Houari Sahraoui

  • Affiliations:
  • Université de Montréal, Montréal, PQ, Canada;Université de Montréal, Montréal, PQ, Canada;Université de Montréal, Montréal, PQ, Canada

  • Venue:
  • Proceedings of the IEEE/ACM international conference on Automated software engineering
  • Year:
  • 2010

Quantified Score

Hi-index 0.00

Visualization

Abstract

We propose an approach for the automatic detection of potential design defects in code. The detection is based on the notion that the more code deviates from good practices, the more likely it is bad. Taking inspiration from artificial immune systems, we generated a set of detectors that characterize different ways that a code can diverge from good practices. We then used these detectors to measure how far code in assessed systems deviates from normality. We evaluated our approach by finding potential defects in two open-source systems (Xerces-J and Gantt). We used the library JHotDraw as the code base representing good design/programming practices. In both systems, we found that 90% of the riskiest classes were defects, a precision far superiour to state of the art rule-based approaches.