1. Detecting missing method calls as violations of the majority rule
- Author
-
Martin Monperrus, Mira Mezini, Software Technology Group [Darmstadt], Technische Universität Darmstadt - Technical University of Darmstadt (TU Darmstadt), Adaptive Distributed Applications and Middleware (ADAM), Laboratoire d'Informatique Fondamentale de Lille (LIFL), Université de Lille, Sciences et Technologies-Institut National de Recherche en Informatique et en Automatique (Inria)-Université de Lille, Sciences Humaines et Sociales-Centre National de la Recherche Scientifique (CNRS)-Université de Lille, Sciences et Technologies-Institut National de Recherche en Informatique et en Automatique (Inria)-Université de Lille, Sciences Humaines et Sociales-Centre National de la Recherche Scientifique (CNRS)-Inria Lille - Nord Europe, and Institut National de Recherche en Informatique et en Automatique (Inria)
- Subjects
FOS: Computer and information sciences ,Majority rule ,Information retrieval ,business.industry ,Computer science ,Best practice ,Code smell ,[INFO.INFO-SE]Computer Science [cs]/Software Engineering [cs.SE] ,Software Engineering (cs.SE) ,Set (abstract data type) ,Computer Science - Software Engineering ,Software ,Key (cryptography) ,Code (cryptography) ,business - Abstract
International audience; When using object-oriented frameworks it is easy to overlook certain important method calls that are required at particular places in code. In this paper, we provide a comprehensive set of empirical facts on this problem, starting from traces of missing method calls in a bug repository. We propose a new system that searches for missing method calls in software based on the other method calls that are observable. Our key insight is that the voting theory concept of majority rule holds for method calls: a call is likely to be missing if there is a majority of similar pieces of code where this call is present. The evaluation shows that the system predictions go further missing method calls and often reveal different kinds of code smells (e.g. violations of API best practices).
- Published
- 2013