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

A method and device for comparing program text

A technology of program text and method body, applied in the computer field, can solve the problem that cannot be combined with the characteristics of programming language grammar of program files, etc., and achieve the effect of improving intelligence, accuracy and efficiency.

Active Publication Date: 2015-09-02
ALIBABA GRP HLDG LTD
View PDF2 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0008] The embodiment of the present application provides a method and device for comparing program texts, which solves the problem that the method of text comparison in the prior art cannot combine the grammatical characteristics of the programming language used in the program files, and accurately judge two programs that are identical in program structure program files for the same problem

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
  • A method and device for comparing program text
  • A method and device for comparing program text
  • A method and device for comparing program text

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0021] As mentioned in the background technology, the comparison of program texts in the prior art is to judge whether two program texts are the same through the method of text comparison, and it is impossible to accurately judge two programs that differ in text content but are identical in program structure The text is the same. In order to solve the defects of the prior art, this application proposes a method for comparing program texts, which includes: analyzing and comparing two program texts based on the program structure; if the comparison results are the same, then determine whether the two programs The texts are the same; if the comparison results are different, it is determined that the two program texts are different.

[0022] The embodiment of the present application provides a method for comparing program texts, such as figure 1 shown, including the following steps:

[0023] Step S101, analyzing the two program texts based on the program structure to obtain corre...

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 embodiment of the invention discloses a method and equipment for comparing program texts. The method comprises the steps of: performing program structure analysis on a first program text and a second program text to obtain first program structure description information and second program structure description information; comparing the first program structure description information with the second program structure description information; if the comparison results of the first program structure description information and the second program structure description information are the same, determining that the first program text is the same as the second program text; and if the comparison results are different, determining that the first program text is different from the second program text. By the technical scheme, the program texts with different text contents and same program structure can be judged; the intelligence and accuracy of comparing the program texts are improved; and the program development and management efficiency is increased.

Description

technical field [0001] The present application relates to the field of computer technology, in particular to a method and device for comparing program texts. Background technique [0002] The version management system is a system used to manage the change records of documents, program texts, and other computer file information. It is suitable for software development occasions where multiple people modify the same file. Each change to a managed file is called a version, and each version has a timestamp and a committer corresponding to it. Changes to files can be used for comparison, reversion, and even merging. [0003] When managing source code, the corresponding version management system is a source code management system. Current source code management systems, such as svn (subversion), usually use a text comparison method to compare program texts. Specifically, the method of character matching is used to compare the text of the two program texts, and the substrings are...

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
Patent Type & Authority Patents(China)
IPC IPC(8): G06F9/44
Inventor 汪翔
Owner ALIBABA GRP HLDG LTD
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