Font Size: a A A

Research On Pull Request Review Sequence Generation Based On Program Analysis

Posted on:2021-05-20Degree:MasterType:Thesis
Country:ChinaCandidate:X Y LiFull Text:PDF
GTID:2428330614965830Subject:Software engineering
Abstract/Summary:PDF Full Text Request
Pull Request(PR)is a process in which code involving different functions is incorporated into the trunk when the team develops software together.In this process,the contributors of the project can modify and submit the code,and before the latest code is merged into the core central repository,a core member(or reviewer)of the development team reviews the code to ensure the correctness of the code modification.Usually a PR should only include the modification of one function,but in the actual development process,some contributors will submit PRs that do not strictly adhere to the code submission specifications.These PRs include commits associated with multiple functions,and each commit Includes multiple file modifications.When reviewers review changes in PRs,due to the large number of files contained in such PRs and the order of files to be reviewed is usually arbitrary,PR reviewers need to spend a lot of time determining the functions involved in PR modifications and individual functions Where to start,this greatly reduces the efficiency of PR audit.Therefore,this paper proposes a PR review sequence generation technology based on program analysis.First,the method selects PRs that meet the analysis criteria from the code warehouse(including more than one function modification or a large number of file modifications);then generate a program to be analyzed by a method of pre-merging PR into temporary branches to ensure that the core branch of the project is not blocked Modification pollution with unknown correctness;At the same time,based on static program analysis,a call graph Call Graph is generated for the program to be analyzed,and the call relation related to the PR modification file is extracted from the call graph;second,to better analyze the modified file Existing relationship,the modified file included in the PR is used as the graph node to establish the graph structure,and the files with the calling relationship are classified into the same function based on the depth-first traversal algorithm based on the relationship between the files,and based on the function classification Establish a review order for files in the same function,our method provide an orderly review order for PR audits by function.Finally,based on the method of PR review order generation,a total of 50 PRs from five open source projects were selected on Git Hub for a manual evaluation experiment.The results show that the review order generated by this method can effectively reduce the review of understanding PR file modifications Time,which can reduce the review time by up to 31%.At the same time,the evaluation of the PR review sequence of the method by 10 evaluators shows that the PR review sequence generated by our method in the selected experimental project is helpful to understand the modification of PR.
Keywords/Search Tags:Program analysis, functional classification, PR review order, Call Graph
PDF Full Text Request
Related items