Code repair case obtaining method, device and equipment and storage medium
A code and case technology, applied in version control, software maintenance/management, reverse engineering, etc., can solve the problems of limited number of code repair cases and low efficiency of collecting cases
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0029] figure 1 It is a flow chart of a method for obtaining a code repair case provided by Embodiment 1 of the present invention. This embodiment is applicable to the situation where the code repair case is automatically obtained according to the requirement of automatic source code repair, and the method can be obtained from the corresponding code repair case implemented by means, the means may be implemented in software and / or hardware, and may be configured on equipment, such as computer equipment.
[0030] like figure 1 As shown, code repair case acquisition methods can include:
[0031] S101. Obtain fingerprint information of the code line to be repaired in the current version and the incremental version of the target source code respectively, wherein the fingerprint information is used to uniquely describe the code line.
[0032] Since the code needs to iteratively repair the defective code before the code is put into the warehouse, the incremental version of the targ...
Embodiment 2
[0055] figure 2 It is a schematic flowchart of a method for acquiring code repair cases provided by Embodiment 2 of the present invention. This embodiment is based on the above-mentioned embodiments, and before extracting the corresponding code segment, an operation of checking the fingerprint information of the code line to be repaired in the code segment is added.
[0056] like figure 2 As shown, code repair case acquisition methods can include:
[0057] S201. Acquire fingerprint information of the code line to be repaired in the current version and the incremental version of the target source code respectively, wherein the fingerprint information is used to uniquely describe the code line.
[0058] S202. Compare the fingerprint information of the code line to be repaired in different versions of the target source code, and determine the target fingerprint information, wherein the target fingerprint information exists in the current version and does not exist in the incr...
Embodiment 3
[0066] image 3 It is a schematic structural diagram of a device for obtaining code repair cases provided by Embodiment 3 of the present invention. like image 3 As shown, the device includes:
[0067] The fingerprint information extraction module 301 is used to respectively obtain the fingerprint information of the code line to be repaired in the current version and the incremental version of the target source code, wherein the fingerprint information is used to uniquely describe the code line;
[0068] A screening module 302, configured to compare the fingerprint information of the line of code to be repaired in different versions of the target source code, and determine the target fingerprint information, wherein the target fingerprint information exists in the current version and does not exist in the incremental version;
[0069] The first locating module 303 is configured to obtain the pre-repair abstract syntax tree corresponding to the current version of the target s...
PUM
Login to View More Abstract
Description
Claims
Application Information
Login to View More 


