| With the rapid development of software industry,a software product usually needs to run on multiple platforms.To meet this need,developers usually write software products to support multiple platforms in different programming languages.To reduce development costs,developers usually migrate the software product directly from one programming language to another programming language after getting the version of one programming language,and how to improve the efficiency of migration in this process is the research direction of software developers.Developers usually invoke APIs to help complete software functions to improve development efficiency.Therefore,the efficiency of project migration can be greatly improved if APIs with similar functional characteristics in different languages can be found during the software project migration process.Thus,a number of API recommendation tools have been created to help search similar APIs.Currently most of the existing API recommendation methods mine API function description information from API description documents and recommend according to API function similarity.However,functionally similar APIs may be used differently in different programming languages,so if the API is functionally similar only,the recommended API may require significant changes in code structure to be used when the project is migrated.Therefore,the complexity and operation capacity of API replacement during project migration and will be reduced greatly if we can find APIs that use the same way on the basis of similar functions.To achieve this goal,we propose using usage information from the API call graph to optimize across languages API recommendation results.This method can take into account the similar in function and usage of API,complete the task of API recommendation from Java to Python language.Firstly,the candidate results are obtained by using the similarity of the description semantic information of the API.Then,the candidate results are optimized by using the usage information of the API in the API call graph to obtain the recommendation list of the API.Finally,we used experiments to evaluate the effectiveness of API usage information for recommending APIs.Experiments show that adding API usage information to map similar APIs can improve the recommendation efficiency of APIs to a certain extent,and thus further improve the migration efficiency of software projects from Java language to Python. |