Detecting Missing Method Calls as Violations of the Majority Rule
Martin Monperrus (INRIA Lille - Nord Europe), Mira Mezini

TL;DR
This paper introduces a novel approach to detect missing method calls in object-oriented code by applying the majority rule voting concept, improving bug detection and revealing code smells.
Contribution
It proposes a new system that identifies missing method calls based on observable calls and majority voting, advancing automated code analysis techniques.
Findings
System predicts additional missing method calls beyond initial detection.
Predictions often reveal violations of API best practices.
Approach effectively uncovers code smells related to method call omissions.
Abstract
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).
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
