Software code fragment history tracing method

A technology of code fragments and software codes, applied in the field of computer software, can solve problems such as the difficulty of conveniently tracing and checking the modification history of fine-grained code fragments
CN110532019AActive Publication Date: 2019-12-03PEKING UNIV

Patent Information

Authority / Receiving Office
CN · China
Current Assignee / Owner
PEKING UNIV
Publication Date
2019-12-03

Smart Images

  • Figure 1
    Figure 1
  • Figure 2
    Figure 2
  • Figure 3
    Figure 3
Patent Text Reader

Abstract

The invention discloses a software code fragment history tracing method, which comprises the following steps of: 1) for each target software project, acquiring code submission information of each version of the project from a Git version control system to obtain a Git library of the project, and acquiring Issue data of the project from a Jira defect tracing system; 2) for a to-be-queried code snippet, firstly scanning the Git library of the corresponding project, positioning the class file of the version to which the code snippet belongs, and then obtaining all versions of the class file; secondly, constructing an abstract syntax tree AST for each version of code, and matching nodes of AST of adjacent versions to obtain related code fragments in the adjacent versions; and 3) comparing whether the code snippets are the same or not, if so, filtering out the code snippets of the next version, and finally, retaining the changed code snippets through filtering, and displaying the code submission information of the corresponding version and the related Issue information in a time axis manner.
Need to check novelty before this filing date? Find Prior Art

Description

technical field

[0001] The invention belongs to the technical field of computer software, and relates to a method for tracing the history of software code fragments. Background technique

[0002] The code of a software project generally undergoes multiple revisions during its life cycle. In addition to the change of the code itself, a large number of Issue (defect information) and Commit (commit information) are also generated during this process. Understanding the change history information of software codes is of great significance to both software developers and software maintainers. However, the existing version control system (such as Git) can only support the history of code traced by the file as the basic unit. It will take a lot of time to filter and search information.

[0003] In order to solve the above problems, the researchers carried out the work related to the history tracing of code fragments. Typically, Francisco Servant proposes a fuzzy code history anal...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More