Automatic Parameter Recommendation for Practical API Usage

Staff - Faculty of Informatics

Start date: 30 May 2012

End date: 31 May 2012

The Faculty of Informatics is pleased to announce a seminar given by Cheng Zhang

DATE: Wednesday, May 30th 2012
PLACE: USI Università della Svizzera italiana, room SI-008, Informatics building (Via G. Buffi 13)
TIME: 14.30

ABSTRACT:
Programmers extensively use application programming interfaces (APIs) to leverage existing libraries and frameworks. However, correctly and efficiently choosing and using APIs from unfamiliar libraries and frameworks is still a non-trivial task. Programmers often need to ruminate on API documentations (that are often incomplete) or inspect code examples (that are often absent) to learn API usage patterns.
Recently, various techniques have been proposed to alleviate this problem by creating API summarizations, mining code examples, or showing common API call sequences. However, few techniques focus on recommending API parameters.

In this presentation, we introduce an automated technique, called Precise, to address this problem. Differing from common code completion systems, Precise mines existing code bases, uses an abstract usage instance representation for each API usage example, and then builds a parameter usage database. Upon a request, Precise queries the database for abstract usage instances in similar contexts and generates parameter candidates by concretizing the instances adaptively. Results of experiments and a user study show that the technique is more general and applicable than existing code completion systems, and can be useful in practice.

BIO:
Cheng Zhang is a PhD student in the Department of Computer Science and Engineering, Shanghai Jiao Tong University, China. He received his bachelor's degree in software engineering and master's degree in computer application technology from Shanghai Jiao Tong University in 2004 and 2007, respectively. His research interests include program analysis, program debugging, and code optimization. The primary goal of his research is to build tools that help developers construct and maintain software systems more easily.

HOST: Prof. Walter Binder