Font Size: a A A

Research Of Migration Technology For Java Project Third-Party Libraries

Posted on:2022-12-11Degree:MasterType:Thesis
Country:ChinaCandidate:X H HeFull Text:PDF
GTID:2518306773997489Subject:FINANCE
Abstract/Summary:PDF Full Text Request
As software products have become larger and more complex,third-party libraries have become necessary for most software.Developers often need to replace one library with another while maintaining the same functionality of the library.Replacing a library with a different library is called library migration.Library migration is a tedious task,and migration often means a considerable amount of work.The migration process is widely considered a difficult,error-prone,and time-consuming process.This manual process is complex,error-prone,and costly for companies.In order to solve the problems in the above library migration process,this thesis conducts an in-depth study of Java third-party library migration.This thesis attempts to solve the API mapping problem in the migration process of third-party libraries from the perspective of API documents and library source codes.It proposes an API mapping method based on API documents and library source codes.The idea of this method is that many third-party libraries have provided API documents.There is a lot of information in the documents,including method descriptions,parameter types,return value related information descriptions,method signatures,etc.,combined with the extracted library source code features after Code2 vec and Kernel Principal Component Analysis(KCPA)processing to make up for the lack of some fields in the library document.Extracting features from the above information better implements API mapping during third-party library migration.The API mapping method proposed in this study takes two different third-party libraries and their library API documentation and source code as inputs.It also recommends method mapping between them.This method learns from the historical changes to third-party libraries that developers manually perform in different open source projects.It then uses the similarities between the third-party library API documents,method signatures,and library source codes for method mapping between the two third-party libraries.Based on the proposed third-party library migration API mapping method,this thesis studies specifically 56325 Java open source projects,analyzes their historical change records,analyzes 35145 classes containing migration and 3481 refactoring operations,filters out the 8 most commonly used migration rules by migration frequency and the number of mapping methods,and compares the approach of this thesis with the common third-party library migration API mapping methods RAPIM,LTR,FS,and TMAP by using the filtered migration rules.Experimental results show that the accuracy rate of the proposed method is 1.8%,which verifies the effectiveness of the proposed method compared with the most advanced RAPIM technology.In addition,in this thesis,different dimensionality reduction methods are compared to evaluate the rationality of dimensionality reduction treatment of source code features.Six sets of migration rules and 10 sets of different dimensionality reduction quantities were used to experiment.The results show that the KPCA dimensionality reduction method and the number of dimensionality reduction selected in this thesis can make the features extracted from the source code complete the third-party library migration API mapping more reasonably.
Keywords/Search Tags:Third-Party Libraries, Library Migrations, API Documentation, KPCA, Code2vec
PDF Full Text Request
Related items