Mining API mapping for language migration
Authors:
Open Access
- 1 May 2010
- conference paper
- Published by Association for Computing Machinery (ACM)
- Vol. 1, 195-204
Abstract
To address business requirements and to survive in competing markets, companies or open source organizations often have to release different versions of their projects in different languages. Manually migrating projects from one language to another (such as from Java to C#) is a tedious and error-prone task. To reduce manual effort or human errors, tools can be developed for automatic migration of projects from one language to another. However, these tools require the knowledge of how Application Programming Interfaces (APIs) of one language are mapped to APIs of the other language, referred to as API mapping relations. In this paper, we propose a novel approach, called MAM (Mining API Mapping), that mines API mapping relations from one language to another using API client code. MAM accepts a set of projects each with two versions in two languages and mines API mapping relations between those two languages based on how APIs are used by the two versions. These mined API mapping relations assist in migration of projects from one language to another. We implemented a tool and conducted two evaluations to show the effectiveness of MAM. The results show that our tool mines 25,805 unique mapping relations of APIs between Java and C# with more than 80% accuracy. The results also show that mined API mapping relations help reduce 54.4% compilation errors and 43.0% defects during migration of projects with an existing migration tool, called Java2CSharp. The reduction in compilation errors and defects is due to our new mined mapping relations that are not available with the existing migration tool.Keywords
Funding Information
- National Natural Science Foundation of China (90718042, 90718016)
- Division of Computing and Communication Foundations (CCF-0725190CCF-0845272)
- Science Fund for Creative Research Groups (60821003)
- Army Research Office (W911NF-08-1-0443W911NF-08-1-0105)
- Ministry of Science and Technology of the People's Republic of China (2007CB3108022009CB320703, 2007AA0103032007AA010301)
This publication has 15 references indexed in Scilit:
- MAPO: Mining and Recommending API Usage Patterns2009
- Mining API Error-Handling Specifications from Source Code2009
- Mining exception-handling rules as sequence association rules2009
- Parseweb2007
- API-Evolution Support with Diff-CatchUpIEEE Transactions on Software Engineering, 2007
- An Experiment in Automatic Conversion of Legacy Java Programs to C#2006
- A lightweight approach for migrating web frameworksInformation and Software Technology, 2005
- CatchUp!2005
- SPiCE: a system for translating Smalltalk programs into a C environmentIEEE Transactions on Software Engineering, 1995
- Program translation via abstraction and reimplementationIEEE Transactions on Software Engineering, 1988