Method and device of recognizing and checking modifying code blocks based on difference information file

A technology of difference information and file identification, applied in software testing/debugging, etc., can solve problems such as low work efficiency, increased workload, long inspection time, etc., and achieve the effect of short inspection time and high work efficiency

Active Publication Date: 2013-05-08
FENGHUO COMM SCI & TECH CO LTD
View PDF2 Cites 30 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

Therefore, in the output violation information fed back by the code inspection and analysis tool, a large number of codes are unmodified source code files; if the unmodified source code files are modified according to the inspection results of the code inspection and analysis tool, not only may new errors be introduced ( bug), thus causing unnecessary harm to the source code files, and additional testing is required, which increases the workload and lowers the work efficiency
[0006] (2) For larger source code files (such as source code files with tens of thousands or hundreds of thousands of lines), it takes a long time to check the full text of source code files using code inspection and analysis tools. low work efficiency

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
  • Method and device of recognizing and checking modifying code blocks based on difference information file
  • Method and device of recognizing and checking modifying code blocks based on difference information file
  • Method and device of recognizing and checking modifying code blocks based on difference information file

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0029] The present invention will be described in further detail below in conjunction with the accompanying drawings and embodiments.

[0030] see figure 1 As shown, the method for identifying and checking the modified code block based on the difference information file provided by the embodiment of the present invention includes the following steps:

[0031] S1: Generate a difference information file through the source code file management tool. The difference information file includes the modification information of the source code file. The modification information includes the line number of the modified line of the source code file, the type of modification and the content of the modified code. The type of modification includes new, Delete and replace. In the difference information file, "+" represents addition, "-" represents deletion, and "" represents replacement.

[0032] S2: Traverse the difference information file, analyze the line numbers of all modified lines in...

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 method and a device of recognizing and checking modifying code blocks based on a difference information file and relates to the field of source code file check. The method is that the difference information file which comprises line numbers of modifying lines is generated through a source code file management tool; whether the line numbers of the adjacent modifying lines are continuous is judged; if the line numbers of the adjacent modifying lines are continuous, the continuous modifying lines are combined to be modifying blocks; if the line numbers of the adjacent modifying lines are not continuous, the modifying lines are marked to be the modifying blocks; whether intervals of the modifying blocks are all located in intervals of code blocks is judged; if the intervals of the modifying blocks are all located in the intervals of the code blocks, the code blocks are marked to be the modifying code block; otherwise, the modifying blocks are marked to be the modifying code blocks; all the modifying code blocks are integrated; integrated codes are conducted with code normative checking. According to the method and the device of recognizing and checking the modifying code blocks based on the difference information file, the modifying code blocks can be recognized. When the code normative checking is conducted, only the codes of the modifying code blocks need to be checked so as to know whether code standards are violated. Not only is the checking time short and the working efficiency high, but also the using safety of a modified source code file is guaranteed.

Description

technical field [0001] The invention relates to the field of source code file checking, in particular to a method and device for identifying and checking modified code blocks based on difference information files. Background technique [0002] In the process of software development, secondary development often occurs on the basis of open source or third-party commercial code files. The source code file after the secondary development is composed of two parts: one part is the original open source or commercial code; the other part is the code added or modified during the secondary development. These two parts come from different development teams, and the coding standards followed are generally different. [0003] After the source code file is modified, in order to ensure that the modified source code file conforms to the coding specification, it is generally necessary to check the modified source code file through a code inspection and analysis tool. Check the modified sou...

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 Applications(China)
IPC IPC(8): G06F11/36
Inventor 杜利夏冉
Owner FENGHUO COMM SCI & TECH CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products