Code abstract generation method based on code knowledge graph and knowledge migration
A technology of code summary and knowledge map, which is applied in the field of automatic code generation summary, can solve problems such as unused knowledge map and unused API description information, and achieve the effect of improving quality
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0053] Take the following Java code as an example:
[0054] public static Uri.Builder appendId(Uri.Builder builder, long id) {return builder.append EncodedPath(string.valueOf(id));
[0055]}
[0056] The API sequence extracted from the code is:
[0057] String. valueOf
[0058] By querying as Figure 4 In the knowledge map shown, replace the API sequence with the API sequence description sequence (including function description and problem description), as follows:
[0059] Returns the string representation of the Object argument.
[0060] Why String.valueOf(null) is causing null pointer exception.
[0061] The result of its artificial summary is: appends the given id to the end of the path.
[0062] Only the API description is used, and the API summary generated by using the API summary model pre-trained on large-scale projects is: returns a string representation of this object.
[0063] It can be seen that the model has been able to capture part of the semantic inform...
Embodiment 2
[0071] Take the following Java code as an example:
[0072]
[0073] The API sequence extracted from the code is:
[0074] String. startsWith
[0075] String. startsWith
[0076] String.substring
[0077] String. startsWith
[0078] String. length
[0079] String.substring
[0080] By querying as Figure 4 In the knowledge map shown, replace the API sequence with the API sequence description sequence, as follows:
[0081] InputStream.available
[0082] InputStream.read
[0083] OutputStream.write
[0084] OutputStream.flush
[0085] By querying as Figure 4 In the knowledge map shown, replace the API sequence with the API sequence description sequence (including function description and problem description), as follows:
[0086] Returns an estimate of the number of bytes that can be read(orskipped over) from this input stream without blocking by the next invocation of a method for this input stream.
[0087] What does InputStream. available() do in Java.
[0088...
PUM
Abstract
Description
Claims
Application Information
- R&D Engineer
- R&D Manager
- IP Professional
- Industry Leading Data Capabilities
- Powerful AI technology
- Patent DNA Extraction
Browse by: Latest US Patents, China's latest patents, Technical Efficacy Thesaurus, Application Domain, Technology Topic, Popular Technical Reports.
© 2024 PatSnap. All rights reserved.Legal|Privacy policy|Modern Slavery Act Transparency Statement|Sitemap|About US| Contact US: help@patsnap.com