Patents
Literature
Hiro is an intelligent assistant for R&D personnel, combined with Patent DNA, to facilitate innovative research.
Hiro

81 results about "Code annotation" patented technology

Annotation is a term used in computer programming to refer to documentation and comments that may be found on code logic. Annotation is typically ignored once the code is executed or compiled.

Source code annotation language

Techniques and tools for implementing a source code annotation language are described. In one aspect, keywords are added to a function interface to define a contract for the function independent of function call context. In another aspect, annotations are inserted at global variables, formal parameters, return values, or user-defined types. The annotations include, for example, properties and qualifiers. A property can indicate, for example, a characteristic of a buffer. In another aspect, an annotation indicates that a value has usability properties sufficient to allow a function to rely on the value, where the usability properties depend on value type.
Owner:MICROSOFT TECH LICENSING LLC

Method for automatically generating Java code annotations based on Graph2Seq of deep reinforcement learning

ActiveCN110018820AAnnotation is accurateAnnotation is accurate and naturalCreation/generation of source codeProgram graphTheoretical computer science
The invention provides a method for automatically generating Java code annotations based on Graph2Seq of deep reinforcement learning At the encoder end, codes are firstly converted into a form of a code graph, a graph structure is utilized to express structured information of the codes, and then a graph neural network is utilized to encode a program graph to obtain structured semantic informationof the codes. At the decoder end, the decoder improved based on the deep reinforcement learning framework is used for obtaining the natural language annotation content corresponding to the decoder, the problem of high deviation caused by the fact that no real sequence word guidance exists in the reasoning stage in a traditional method is solved, and therefore code annotation natural generation isaccurate and natural.
Owner:BINHAI IND TECH RES INST OF ZHEJIANG UNIV

Javadoc-based back-end interface document automatic generation method and apparatus

The invention discloses a Javadoc-based back-end interface document automatic generation method. The method specifically comprises the following steps of defining interface information in an interface file; performing description on the interface information by adopting Javadoc: describing code annotation and interface; performing automatic identification by adopting AST code analysis: identifying an input parameter, a return value type, a URL and abnormal data of the interface; and according to a definition of the interface and standard Javadoc, fully automatically generating an interface document. Through the AST code analysis technology, the back-end interface document can be fully automatically generated after all codes are changed in combination with the definition of the interface according to the Javadoc; and front-end codes can be generated according to interface data, so that the problem of desynchrony of the codes and the manually written interface document in the past is solved, the time for writing the interface document is saved, the situation of reworking caused by the problem of desynchrony of the interface document and the codes can be avoided, and the business system development efficiency is improved.
Owner:珠海牛角科技有限公司

A code annotation generation method based on program analysis and a recurrent neural network

The invention discloses a code annotation generation method based on program analysis and a recurrent neural network. The code annotation generation method comprises the following steps: constructinga large-scale code library; Extracting information contained in each Java method in the Java project and dependency information of each Java method; Filtering and reconstructing an execution code partof each Java method by combining a heuristic method according to the extracted information; obtaining Annotations matched with the execution codes; Combining the filtered codes and corresponding annotations into a set of (codes, annotations) pairs, and taking the set as a training set of a code annotation generation model; According to the training set obtained through the steps, an Encoder-Decoder model-is used for carrying out the training of a code annotation generation model; And after model training is completed, prediction can be performed. The annotations generated by the method are concise and clear, and can help developers understand code functions, accelerate the software maintenance process and improve the quality of software products.
Owner:NANJING UNIV OF AERONAUTICS & ASTRONAUTICS

Code annotation generation method based on structural perception

The invention belongs to the technical field of computer application, and particularly relates to a code annotation generation method based on structural perception. Hierarchical information of a codefragment is obtained by using an abstract syntax tree, so that a code annotation generator based on structural perception is constructed. According to the model called Code2Text, a source code is combined with an abstract syntax tree of the source code, and the model is applied to the field of code annotation. A dual encoder in the Code2Text encodes the source code sequence input and the abstractsyntax structure input respectively, and each word in the source code and each node in the abstract syntax tree are utilized to accurately adjust the generated word through a dual attention mechanismso as to guide the decoding process. The method can assist a programmer to generate annotations so as to reduce the manual writing cost, and can also provide reference for the programmer without experience to understand existing codes; and the method can be used for application program code detection of data use.
Owner:FUDAN UNIV

Interface document generating method and terminal device

The present invention belongs to the technical field of computers and particularly relates to an interface document generation method and a terminal device. Developers add corresponding code annotations on code segments synchronously during the writing of codes. In these code annotations, preset identifiers are used to identify summary information, parameter information and service category and the like respectively. After the developers complete the code writing and issue an instruction for generating an interface document, the method can be used to extract annotation information identified by these identifiers respectively, the annotation information is added into the generated interface document, so that the writing of the interface document is automatically completed, and the generatedinterface document can be automatically stored in a corresponding document library, which greatly reduces the time required for the developers to participate and can effectively improve work efficiency and reduce development costs.
Owner:PINGAN YIQIANBAO E COMMERCE CO LTD

Interface document generation method and device, electronic equipment and storage medium

The invention provides an interface document generation method and a device, electronic equipment and a storage medium. The method is applied to a program code for parameter definition based on a codeannotation of a Swagger. The method comprises the steps: receiving an interface document generation request; determining a target program code according to the interface document generation request,and obtaining a predefined interface document template associated with the target program code; analyzing a code annotation corresponding to the target program code, and obtaining attribute information of the target program code from the code annotation; importing the attribute information into the predefined interface document template to generate an interface document corresponding to the interface document generation request; displaying the interface document. The embodiment of the invention is applied to a program code for parameter definition based on a code annotation of a Swagger, and standardization and universality of the code annotation can be realized; the interface document is automatically generated according to the target program code, and the accuracy of the interface document is improved.
Owner:TAIKANG LIFE INSURANCE CO LTD

Method and device for interface document generation, computer device, and storage medium

The invention relates to a method and a device for interface document generation, a computer device, and a storage medium. The method comprises: obtaining a code file, traversing classes of a plurality of interfaces recorded in the code file, and obtaining code annotation information corresponding to the currently traversed classes; finding a global parameter in the currently traversed class, andobtaining global parameter information from definition of the global parameter in the class and the code annotation information corresponding to the class; by traversing class methods in the classes,reflecting all interfaces contained in the classes, obtaining interface information of each interface from a method body corresponding to the traversed class method and the code annotation informationcorresponding to the class; adding the global parameter information to the interface information of all interfaces and writing the obtained interface information to an interface document. The methodcan automatically collect interface information and effectively improve generation efficiency of the interface documents.
Owner:WEIKUN (SHANGHAI) TECH SERVICE CO LTD

Program code annotating management method and device

The invention discloses a program code annotating management method and device. The program code annotating management method comprises the following steps of: analyzing a program code and obtaining a relevant index between an annotation and the program code or obtaining the relevant index between the annotation and the program code from an annotation library; and carrying out synchronous processing on an independent annotation and the program code according to the relevant index. The program code annotating management device comprises a code input and output module, an annotation input and output module, a code annotation relevant module, a code storage module and an annotation storage module. The program code annotating management method and device of the invention solve the problem of independent management of the program code annotation and improve the efficiency of program development.
Owner:阳振庭

Code annotation classification method based on neural network model

The embodiment of the invention discloses a code annotation classification method based on a neural network model. The method includes: constructing a corpus of annotations, and generating a word vector for representation of each annotation word; classifying the annotations, and manually defining classes; carrying out preprocessing and word embedding processing on the annotations to obtain a 250-dimensional word vector of each word; and entering the 250-dimensional word vector of each word into a classification model to carrying out classification processing to obtain a classification result.In the embodiment of the invention, the context features of the annotations are considered, semantic features of the annotations are also considered, attention is assigned according to word importanceweights, text can be better characterized, and classification is also more accurate. Compared with implementation of other technology, the method is suitable for use in classification of various annotations.
Owner:SUN YAT SEN UNIV

Adding code commentary to source code during software debugging

Software debugging having means for linking with source code code commentary relating to the source code's execution is provided. An advantage is achieved by storing the code commentary received from a user during software debugging about a program's execution directly alongside the source code.
Owner:IBM CORP

A source code annotation automatic generation method and system

The invention relates to a source code annotation automatic generation method and system. Semantic analysis is carried out on a first source code and an abstract syntax tree is generated, Therefore, the internal mapping relation between the natural language and the program language is established, and the second source code is annotated according to the mapping relation. The computer efficiently analyzes the program language and then maps the program language to the corresponding natural language, so that a programmer can efficiently and easily understand the function realized by the source code. And a programmer is helped to quickly know the internal operation mechanism of the computer program, so that the programmer is helped to quickly identify defects and vulnerabilities in software design. The method has universality. The workload problem of manually analyzing the repeated source codes in the prior art is solved, and time and cost expenditure caused by analyzing the repeated source codes are reduced.
Owner:CHINA STANDARD SOFTWARE

Code annotation generation method based on machine translation model

The invention discloses a code annotation generation method based on a machine translation model. The code annotation generation method comprises the steps that an obtained code corpus containing annotations is divided into a source code method sequence corpus and a corresponding source code annotation corpus; inputting source code annotations in a source code annotation corpus into the seq2seq model; extracting a source code method sequence to generate an abstract syntax tree, replacing identifiers of nodes with node categories, performing structured traversal to obtain a sequence with reserved structure information, and inputting the sequence into a seq2seq model; inputting the structural information into a coding layer to generate a coding output of an implicit state sequence and the structural information, inputting the coding output into an attention mechanism layer, and calculating a context vector according to the matching degree between the coding output of the implicit state sequence and the structural information; inputting the coding output of the structure information and the context vector into a decoding layer, and calculating the sequence probability distribution ofthe training sample target; a sequence-based machine translation model is generated from the source code annotations and the sequence probability distribution.
Owner:SUN YAT SEN UNIV

Receipt storage method and node combining code labeling and transaction types

One or more embodiments of the present specification provide a receipt storage method and node in combination with a code annotation and a transaction type, the method comprising: a first block chain node receiving an encrypted transaction corresponding to a smart contract, the code of the smart contract comprising a field marked by an exposed identifier; the first block chain node decrypts the transaction in a trusted execution environment and executes the obtained code of the smart contract to obtain receipt data; the first block chain node determines a corresponding exposed field according to the transaction type of the transaction; and the first block chain node stores the receipt data, so that an exposed field marked by the exposed identifier in the receipt data is stored in a plaintext form, and the rest receipt fields are stored in a ciphertext form.
Owner:ADVANCED NEW TECH CO LTD

Receipt storage method and node in combination with code annotations and user and event typescombining code labeling with user and event types

One or more embodiments of the present specification provide a receipt storage method and node in combination with code annotations and users and event types, the method may comprise: a first blockchain node receiving receives an encrypted transaction corresponding to a smart contract, the code of the smart contract comprising comprises an object marked by an exposed identifier; the first block chain node decrypts the transaction in a trusted execution environment to obtain a smart contract, wherein the smart contract comprises a special event function; the first block chain node executes the smart contract in the trusted execution environment to obtain receipt data, and the receipt data comprises a log corresponding to the special event function; the first block chain node stores the receipt data; when the transaction initiator belongs to a preset user type, at least one part of the receipt content in the log corresponding to the special event function is stored in a plaintext form, the rest content of the receipt data is stored in a ciphertext form, and the at least one part of the receipt content is matched with the object marked by the exposure identifier.
Owner:ADVANCED NEW TECH CO LTD

Code annotations for preventing access to unsafe functionality

A safe environment is established for running untrusted code in a system whose trusted libraries include native code. Annotations are applied to code in the system libraries to identify safe and unsafe code, and analysis tools reveal whether code outside the system libraries is able to trigger any unsafe behavior.
Owner:GOOGLE LLC

Interface document generation method and device, computer equipment and storage medium

The invention discloses an interface document generation method and device, computer equipment and a storage medium. The interface document generation method comprises the steps: obtaining a source code of a first project; screening out a class method with an interface mark from all class methods of the source code, and marking the class method with the interface mark as an interface class method;extracting interface basic information from a method body corresponding to the interface method through a reflection technology, and extracting interface additional information from code annotation information corresponding to the method body; integrating the interface basic information and the interface additional information to form first interface information; and adding the first interface information into a preset interface document template, and generating a first interface document corresponding to the first interface information according to the preset interface document template. According to the interface document generation method, the first interface document corresponding to the source code of the first project can be automatically generated, so that the consistency of the first interface document and the first interface information is ensured, and the labor cost is effectively saved, and the generation efficiency of the interface document is improved.
Owner:重庆金融资产交易所有限责任公司

Method, device and system for generating code documents in continuous integration

Embodiments of the invention disclose a method, device and system for generating code documents in continuous integration. The method comprises the following steps of: obtaining a code and a code annotation submitted by a user; judging whether the code annotation is correct or not according to the code; if the judging result is positive, storing the code and the code annotation into a code library and executing the next step; if the judging result is negative, returning prompt information; obtaining a code structure and the code annotation, and recording the code structure and the code annotation into a source file; and generating the source file into a code document according to a preset configuration file. According to the method, the code and the code annotation submitted by the users are verified to ensure the consistency between the code annotation and the code; after the verification passes, the source file is generated according to the code structure and the code annotation, submitted by a worker, of the code; and the source file is generated into the code document according to the preset configuration information. According to the method, device and system disclosed by the invention, the automatic generation and timely updating of code documents are realized, so that the manpower resources are saved, and the working efficiency and the correctness of the code documents are improved.
Owner:ZHENGZHOU YUNHAI INFORMATION TECH CO LTD

Object-level receipt storage method and node based on code annotationsCode annotation-based object-level receipt storage method and node

One or more embodiments of the present specification provide a code annotation-based object-level receipt storage method and node, the method comprising:es a first block chain node receiving receives an encrypted transaction corresponding to a smart contract, the code of the smart contract comprising comprises an object marked by an exposed identifier; the first block chain node decrypts the transaction in a trusted execution environment to obtain a code of the smart contract; the first block chain node executes the code of the smart contract in the trusted execution environment to obtain receipt data; and the first block chain node stores the receipt data, so that the receipt content corresponding to the object marked by the exposed identifier is stored in a plaintext form, and the rest receipt contents are stored in a ciphertext form.
Owner:ADVANCED NEW TECH CO LTD

API document generation method and device, storage medium and computer equipment

The invention discloses an API document generation method, a device, a storage medium and computer equipment. The API document generation method comprises the steps of acquiring a target API code compiled by a developer, a target code annotation corresponding to the target API code and a synchronization script; and generating a target API document corresponding to the target API code according tothe target code annotation and the synchronization script. According to the invention, the following problems in the prior art are solved. The API document is separated from the corresponding code. The management of API documents needs to be specially maintained by people. However, in the development process, we need to frequently modify the definition of the API and require the API document to besynchronously updated, but we often forget to update the API document. Therefore, the description of the API document does not accord with the definition of the existing API. The description of the API document falls behind the actual function of the current API.
Owner:SHENZHEN SHUWEI MEDIA TECH CO LTD

HTML (Hypertext Marked Language) generating method and device

The invention provides an HTML (Hypertext Marked Language) generating method and device. The method comprises the following steps of receiving a page loading request so as to obtain a corresponding template; loading the template; obtaining content data of a generated HTML file according to markers in the template; and finally inputting the content data into the template so as to generate an HTML file. In the process, the markers exist in the template in an HTML code annotation mode, so that an editor can prompt syntactic errors in HTML codes; even if the markers have errors, the template loading and the HTML file generation cannot be influenced; the occurrence of page 404 problems is avoided; and the goal of fast and accurately generating the HTML file is achieved.
Owner:NETEASE (HANGZHOU) NETWORK CO LTD

Method and system for automatically generating development document based on code annotation

The invention discloses a method and system for automatically generating a development document based on code annotation, and the method is characterized in that the method comprises the following steps: installing webpack and react-stylegidist for constructing a project; creating and configuring a styleguide.config.js file under a same-level directory of a webpack configuration file, classifyingcomponents of a project, putting the components which need to be exposed to the outside under a views directory, and obtaining .jsx file through a wildcard select\*; introducing a public style and a special style into a project through a package file, conducting global setting on an antd component library, and integrating redux data; configuring a script in a package.json; in webpack configuration, respectively adding and setting different interface addresses for different environments through env environment variables, and then normally accessing an interface through an agent. The effects ofautomatically generating code annotations of components, writing demo and corresponding instructions for various use scenes, attaching a demo source code, modifying the source code and previewing thedemo in real time are achieved.
Owner:百卓网络科技有限公司

Software code annotation

Software code is analyzed to identify one or more symbols in the software code, the one or more symbols corresponding to a defined software syntax. For each of one or more identified symbols: a corresponding annotation that conveys a meaning of the identified symbol is determined; a location within a document to display the annotation is determined so that the annotation, when displayed, is visually associated with the identified symbol; and the annotation is displayed at the location.
Owner:WOLFRAM RESEARCH

Code-annotation conversion method based on dual reinforcement learning

The invention discloses a code-annotation conversion method based on dual reinforcement learning, and the method comprises the steps: converting a code into an annotation stage: building a code annotation generation model, converting the code into a word vector, and carrying out the feature extraction of a sequence and structural information in the code word vector through an LSTM bidirectional neural network; allocating weights to the words in the word vector by using an attention mechanism to obtain the weight of each word; fusing the word vectors and the weights thereof, and calculating theprobability that each word is selected by using a gradient descent method; carrying out dual constraint on the weight of each word and selecting the probability that each word; and calculating the matching degree of each sequence and standard annotations in the data set by using a BLEU evaluation method, and dividing by n to obtain an average value as a reward value of each word in reinforcementlearning.
Owner:DALIAN MARITIME UNIVERSITY

Code testing method and device, equipment and storage medium

The invention relates to the field of testing, and discloses a code testing method and device, equipment and a storage medium. The method comprises the following steps: receiving source codes of a plurality of application items, wherein the source code of each application item comprises a test mark; respectively calculating the test coverage rate of each application item according to the source code of each application item and the test mark of each application item; based on the test coverage rate of each application item, determining a target application item of which the test coverage rate is less than a threshold value; traversing the source code of the target application item to obtain a target code snippet without the test mark; obtaining a target code annotation text corresponding to the target code snippet from a preset annotation library; and generating a network model based on a preset first script, processing the target code annotation text, and obtaining and executing a first target test script corresponding to the target code snippet. The test script is generated based on the annotations corresponding to the code snippets with the test coverage rate smaller than the threshold value so as to directly test, and the test efficiency is improved.
Owner:PINGAN INT SMART CITY TECH CO LTD

Program code annotation generation method and system, electronic equipment and storage medium

InactiveCN111190643AImprove annotation efficiencyProgram documentationProgramming languageObject code
The invention discloses a program code annotation generation method. The generation method comprises the steps of extracting code feature information of a target code; wherein the code feature information comprises a code keyword, a code method, a code action and an action parameter; generating natural language information corresponding to the target code according to the code feature information;and generating an annotation text corresponding to the natural language information, and outputting the target code including the annotation text. The annotation of the program code can be automatically generated, and the code annotation efficiency is improved. The invention furthermore discloses a program code annotation generation system, electronic equipment and a storage medium, which have the above beneficial effects.
Owner:SUZHOU LANGCHAO INTELLIGENT TECH CO LTD

Method for improving annotation rate and annotation quality of open source codes

The invention provides a method for improving annotation rate and annotation quality of open source codes. The method comprises the following steps of 1, establishing a code data server, and preprocessing the open source codes; 2, grading difficulty levels of code segments; 3, grading knowledge mastery levels of users; 3, pushing the code segments to the users of the corresponding levels accordingto the levels, thereby enabling the users to perform corresponding operations; and 5, pushing questions automatically generated for the code segments by a system to the users, performing answering bythe users, and if the answering is correct, displaying that the answering of the users is correct, and highlighting answers of the users; and if the answering is not correct, displaying that the answering of the users is wrong, and providing reference answers. According to the method, a batch of code segments with annotations and high-quality code annotations are formed after multi-time cyclic pushing; rich resources are provided for code reuse; the code retrieval efficiency of developers and the code reuse rate in a software development process are effectively improved; and the development efficiency is greatly improved.
Owner:NAT UNIV OF DEFENSE TECH

Interface document updating method and device, electronic equipment and storage medium

The embodiment of the invention discloses an interface document updating method and device, electronic equipment and a storage medium. The method comprises the following steps: 1, determining a targetmodule of which the code is updated from at least one module in a code database according to a preset rule, obtaining an updated code in the target module and the interface document of the target module, extracting interface information from the code annotation information corresponding to the updated code, performing format processing on the extracted interface information to obtain processed interface information, and updating the interface document of the target module according to the processed interface information to obtain an updated interface document. The interface document of the module can be updated in real time, so that the function of the module can be verified more accurately.
Owner:PING AN TECH (SHENZHEN) CO LTD

Distributed test case execution system and method

The invention provides a distributed test case execution system and method, and the system comprises a temporary code storage unit, a code test cluster unit, and a summarizing unit, and the code testcluster unit comprises a plurality of code test modules; the temporary code storage unit pushes the code to the corresponding code test module according to the code position index table, and replacesthe influence range of the modification attached to the code annotation with the corresponding function index number according to the function index table during pushing; the code test module receivesthe code; the function index numbers are cached, the function index numbers are sorted according to the established function call relationship tree, the sorted function indexes are converted into related test cases which only need to be executed according to a binding relationship table, the test cases are executed to generate related test results, and the related test results to a summarizing unit; and the summarizing unit is used for summarizing the test results of the related test cases are pushed in each code test module to generate an overall test result report.
Owner:ZHENGZHOU XINDA JIEAN INFORMATION TECH
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
Eureka Blog
Learn More
PatSnap group products