A source code annotation generation method and device, a storage medium and a computer device

CN116755769BActive Publication Date: 2026-07-03SUN YAT SEN UNIV

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SUN YAT SEN UNIV
Filing Date
2023-07-19
Publication Date
2026-07-03

Smart Images

  • Figure CN116755769B_ABST
    Figure CN116755769B_ABST
Patent Text Reader

Abstract

A source code annotation generation method and device, a storage medium and a computer device are provided. When automatically annotating source code, the source code to be annotated and the bytecode of the source code to be annotated are first obtained. The bytecode can identify source codes with the same function but different implementation manners. Then, based on a preset word embedding matrix, a text word vector of the source code to be annotated and a bytecode word vector of the bytecode are determined. The text word vector can capture the semantic and syntactic information between the strings of the source code to be annotated. After the text word vector and the bytecode word vector are determined, the text word vector and the bytecode word vector are spliced to form a spliced word vector. The spliced word vector is used to generate an annotation result of the source code to be annotated. In this way, the annotation of the codes with the same function but different implementation manners is constrained, confusion and ambiguity are avoided, and the accuracy of the annotation result is improved.
Need to check novelty before this filing date? Find Prior Art