Your page title

MAM: Mining API Mapping for Language Migration

PROJECT SUMMARY

Since the inception of programming languages, researchers and practitioners developed various languages such as Java and C#. 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. Migrating projects from one language to another language (such as from Java to C#) manually is a tedious and error-prone task. To reduce manual effort or human errors, tools can be developed for automatic translation of projects from one language to another, but these tools require the knowledge of how Application Programming Interfaces (APIs) of one language are mapped to the 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 with 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 translation 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 reduce 54.4% compilation errors and 43.0% defects during translation of projects with an existing translation 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 translation tools.

The paper submitted to ICSE 2010.

PEOPLE

Hao Zhong (iTechs, ISCAS), Suresh Thummalapenta (NCSU), Tao Xie (NCSU), Lu Zhang (PKU), Qing Wang (iTechs, ISCAS)

EMPIRICAL RESULTS

  • Subjects:

  • Found bugs in translated projects: