ePrints@IIScePrints@IISc Home | About | Browse | Latest Additions | Advanced Search | Contact | Help

Discovering Math APIs by Mining Unit Tests

Santhiar, Anirudh and Pandita, Omesh and Kanade, Aditya (2013) Discovering Math APIs by Mining Unit Tests. In: 16th International Conference on Fundamental Approaches to Software Engineering (FASE), MAR 16-24, 2013, Rome, ITALY, pp. 327-342.

[img] PDF
fun_app_sof_eng_7793_327_2013.pdf - Published Version
Restricted to Registered users only

Download (218kB) | Request a copy
Official URL: http://dx.doi.org/ 10.1007/978-3-642-37057-1_24

Abstract

In today's API-rich world, programmer productivity depends heavily on the programmer's ability to discover the required APIs. In this paper, we present a technique and tool, called MATHFINDER, to discover APIs for mathematical computations by mining unit tests of API methods. Given a math expression, MATHFINDER synthesizes pseudo-code to compute the expression by mapping its subexpressions to API method calls. For each subexpression, MATHFINDER searches for a method such that there is a mapping between method inputs and variables of the subexpression. The subexpression, when evaluated on the test inputs of the method under this mapping, should produce results that match the method output on a large number of tests. We implemented MATHFINDER as an Eclipse plugin for discovery of third-party Java APIs and performed a user study to evaluate its effectiveness. In the study, the use of MATHFINDER resulted in a 2x improvement in programmer productivity. In 96% of the subexpressions queried for in the study, MATHFINDER retrieved the desired API methods as the top-most result. The top-most pseudo-code snippet to implement the entire expression was correct in 93% of the cases. Since the number of methods and unit tests to mine could be large in practice, we also implement MATHFINDER in a MapReduce framework and evaluate its scalability and response time.

Item Type: Conference Proceedings
Series.: Lecture Notes in Computer Science
Publisher: SPRINGER-VERLAG BERLIN
Additional Information: Copy right for this article belongs to the SPRINGER-VERLAG BERLIN, HEIDELBERGER PLATZ 3, D-14197 BERLIN, GERMANY
Department/Centre: Division of Electrical Sciences > Computer Science & Automation
Date Deposited: 19 Nov 2014 04:33
Last Modified: 19 Nov 2014 04:33
URI: http://eprints.iisc.ac.in/id/eprint/50288

Actions (login required)

View Item View Item