Detecting Anomalies in the Order of Equally-typed Method Arguments
Image to be a programmer who wants to call a method setEndPoints(int, int). You must pass two arguments of type int. But what should you pass as the first argument and what as the second argument? Methods like this can cause three kinds of problems:
A paper describing our approach has been accepted for ISSTA 2011:
Michael Pradel and Thomas R. Gross.
You can download the source code of our implementation. The tool, Argument Analyzer, is implemented as an Eclipse plugin. It depends in the SecondString project (a library of of string comparison techniques). Once you have the plugin running in Eclipse, you can right click on a Java project and select Argument Analyzer - Anomaly Detection. The tool will analyze all method calls in this project and print a list of anomalies.
A revised version of ArgumentAnalyzer that provides higher recall and precision, as well as support for C (in addition to Java). We have tested the implementation with Eclipse 3.7.1. You'll need the Eclipse JDT and the Eclipse CDT. The source code is made available under the GNU Lesser General Public License.
We used this version of ArgumentAnalyzer in the ISSTA'11 paper. We have tested the implementation with Eclipse 3.5.2. The source code is made available under the GNU General Public License.
The code base we use to evaluate the approach (the source code of the programs from the DaCapo benchmark suite) is available upon request.