Detecting object usage anomalies
Authors:
Open Access
- 7 September 2007
- conference paper
- Published by Association for Computing Machinery (ACM)
- p. 35-44
Abstract
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 se- quences 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 auto- matic 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, in- cluding two new defects in ASPECTJ.Keywords
This publication has 30 references indexed in Scilit:
- PR-MinerACM SIGSOFT Software Engineering Notes, 2005
- DynaMineACM SIGSOFT Software Engineering Notes, 2005
- Permissive interfacesACM SIGSOFT Software Engineering Notes, 2005
- Static object trace extraction for programs with pointersJournal of Systems and Software, 2005
- Mining Temporal Specifications for Error Detection2005
- Finding bugs is easyACM SIGPLAN Notices, 2004
- Typestates for Objects2004
- Automatically checking an implementation against its formal specificationIEEE Transactions on Software Engineering, 2000
- Discovering models of software processes from event-based dataACM Transactions on Software Engineering and Methodology, 1998
- Protocol specifications and component adaptorsACM Transactions on Programming Languages and Systems, 1997