Discovering Likely Mappings between APIs using Text Mining

Developers often migrate applications to release different versions for supporting application programming interfaces (APIs) of various platforms/programming-languages. To migrate an application written using one API (source) to another API (target), a developer needs to know how the methods in the source API map to the methods in the target API. Given a typical platform or language exposes a large number of API methods for developers to reuse, manually writing these mappings is prohibitively resource-intensive and may be error prone. Recently, researchers proposed to automate the process by mining API mappings from existing code-bases. However, these approaches require as input a manually ported (or at least functionally similar) code across source and target API’s. To address the shortcoming, this paper proposes TMAP: Text Mining based approach to discover likely API mappings using the similarity in the textual description of the source and target API documents. To evaluate our approach, we apply TMAP to discover API mappings for 15 classes across: 1) Java and C# API, 2) Java ME and Android API.We next compare the discovered mappings with state-of-the-art source code analysis based approaches: Rosetta and StaMiner. Our results indicate that TMAP on an average found relevant mappings for 57% more methods compared to previous approaches. Furthermore, our results also indicate that TMAP found on average exact mappings for 6.5 more methods per class with a maximum of 21 additional exact mappings for a single class as compared to previous approaches.

PEOPLE

  • Rahul Pandita [North Carolina State University, USA]
  • Raoul Praful Jetley [ABB Corporate Research, India]
  • Sithu D Sudarsan  [ABB Corporate Research, India]
  • Laurie Williams [North Carolina State University, Raleigh]
ARTIFACTS