Detecting object usage anomalies
Andrzej Wasylkowski, Andreas Zeller, Christian Lindig · 2007
Interacting with objects often requires following a protocol—for instance, a specific sequence of method calls. These protocols are not always documented, and violations can lead to subtle problems. Our approach takes code examples to automatically infer legal sequences of method calls. The resulting patterns can then be used to detect anomalies such as “Before calling next(), one normally calls hasNext()”. To our knowledge, this is the first fully automatic defect detection approach that learns and checks method call sequences. Our JADET prototype has detected yet undiscovered defects and code smells in five popular open-source programs, including two new defects in ASPECTJ.
Cited by 272 works. doi:10.1145/1287624.1287632
Authors
References
- Data mining: concepts and techniques
- Refactoring: Improving the Design of Existing Code
- Data Mining - Concepts and Techniques.
- Bugs as deviant behavior
- Discovering models of software processes from event-based data
- Automatically Validating Temporal Safety Properties of Interfaces
- Finding bugs is easy
- Interface automata
- Mining specifications
- Typestate: A programming language concept for enhancing software reliability