基于代码序列和代码图融合的代码补全方法、装置

By combining code sequences and code graphs in the Transformer architecture, the problem of poor code completion performance in existing technologies is solved, achieving more efficient and accurate code completion.

CN115167863BActive Publication Date: 2026-07-17CENT SOUTH UNIV

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
CENT SOUTH UNIV
Filing Date
2022-05-31
Publication Date
2026-07-17

Smart Images

  • Figure CN115167863B_ABST
    Figure CN115167863B_ABST
Patent Text Reader

Abstract

本发明公开了一种基于代码序列和代码图融合的代码补全方法、装置,建立代码补全模型,将原始代码数据集中的代码片段分别转换为代码序列和代码图;将所述代码片段和代码图分别作为所述序列编码器和图编码器的输入,将目标代码作为所述解码器的输入,训练所述代码补全模型,得到训练后的代码补全模型。本发明充分利用了代码的两种形态,更好的理解代码,最终达到了更好的代码补全效果。
Need to check novelty before this filing date? Find Prior Art