Font Size: a A A

Mining API Mapping Based On Documentation

Posted on:2021-05-15Degree:MasterType:Thesis
Country:ChinaCandidate:Z J ZhangFull Text:PDF
GTID:2428330647951071Subject:Computer Science and Technology
Abstract/Summary:PDF Full Text Request
Software developers often need to migrate a project to different platforms using different programming languages.With the increasing number of software,manual code migration is time-consuming and labor-intensive.To speed up code migration,many automated code migration tools have appeared.However,they all face the challenge of API mapping.For a source language project,if an API call occurs in the code,most of code migration tools cannot find the equivalent API in the target language.Therefore,a critical problem is how to implement API mapping between different languages.This paper attempts to solve API mapping from the perspective of documentation and proposes an approach to generally implement API mapping based on documentation.The idea is that many programming languages offer standardized API official documents,which contain a large amount of information such as method description,parameter description and return value description,so we can use the information to extract the model for the API to better implement API mapping.The work of the paper mainly includes the following parts:1.We first propose a general approach that could achieve API mapping based on documentation,and implement a tool called Doc Miner.The approach first extracts information from API documentation and builds a three-dimensional information model,and then designs a similarity calculation and a dynamic searching algorithm to implement one-to-one and one-to-many API mapping with parameter binding.2.Based on the Doc Miner,we specifically study Java-to-Swift API mapping.First,we construct 259 one-to-one and 28 one-to-many API mappings with parameter mapping for 15 Java classes.And then we extract the Swift API mapping relationship for 15 Java classes and select 4 related works for experimental evaluation.The results show that the Doc Miner could achieve good results on the Java-to-Swift API mapping.3.In addition,based on the Doc Miner,we specifically study Java-to-C# API mapping.First,we construct 265 one-to-one mappings with parameter mapping for 40 Java classes through the Java2 CSharp tool.And then we extract Java-to-C# API mapping for 40 classes and select three related works for experimental evaluation.The results show that the Doc Miner could achieve good results on the Java-to-C# API mapping.
Keywords/Search Tags:Code Migration, API Mapping, Parameter Mapping
PDF Full Text Request
Related items