Detecting Argument Selection Defects

Abstract

When calling a method a programmer chooses arguments from a set of available expressions. An argument selection defect occurs when a programmer chooses incorrectly. We implemented a new check for this kind of error and evaluated it on more than 200 million lines of Java code at Google. We achieved a true positive rate in excess of 85% and detected defects in large mature packages such as OpenJDK, ASM and the MySQL JDBC driver. Our approach combines matching of identifier names to generate candidates with analysis of program structure to reject false positives.

This talk explains our approach and quantifies the benefit of this bimodal approach.

This talk covers work that will be published in our paper "Detecting Argument Selection Defects" to appear at OOPSLA/SPLASH 2017. Our check is available as part of the open-source Error Prone project.

Bio

Andrew Rice is a Reader in Computer Science at the University of Cambridge.  His current research focus is on providing tools to help programmers write better code. He recently worked as a Visiting Researcher at Google Inc. in California with the Java compiler team developing new static analysis checks. He is Principal Investigator on Camfort, an EPSRC grant which seeks to provide lightweight verification tools for computational scientists. He lectures undergraduate courses on programming in Java and in Prolog.

This page was last modified on 28 Sep 2017.