Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

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

Active Publication Date: 2019-12-03
PEKING UNIV
View PDF9 Cites 10 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0005] In order to overcome the problem that the existing version control system is difficult to trace back and view the modification history of fine-grained code fragments conveniently, the present invention provides a method for tracing the history of software code fragments

Method used

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
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Software code fragment history tracing method
  • Software code fragment history tracing method
  • Software code fragment history tracing method

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0029] In order to make the above-mentioned features and advantages of the present invention more obvious and understandable, the following special embodiments are described in detail in conjunction with the accompanying drawings as follows:

[0030] Randomly select a code snippet from an open source software Apache Lucene project. Many times, developers will select these code fragments in units of an API / method. For multi-line or single-line code fragments, the present invention mainly traces back by analyzing the method type nodes in the AST tree, and the number of Commits to be checked is not more than the number of Commits related to the method to which it belongs. A code fragment randomly selected by the present invention is shown below: the setReader method in the Tokenizer class under the Lucene project, with 9 lines in total.

[0031]

[0032] Through the method and tool of the present invention, the user can see that this code has undergone 6 revisions in total. ...

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

PUM

No PUM Login to View More

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.

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

Application Information

Patent Timeline
no application Login to View More
IPC IPC(8): G06F8/70
CPCG06F8/70
Inventor 邹艳珍潘兴禄曹英魁谢冰
Owner PEKING UNIV
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products