arrow
Return

Learning code better through structural information of data flow

delete2025-05-24
delete0
PRE
AI
Z
Zhang, Zhe
Y
Yuming Chen
T
T. Y. Jiao
L
Lili Bai
C
Chaopeng Guo
J
Jie Song *
DOI:10.1007/s11227-025-07348-xdelete
deleteOriginal
deleteOriginal request for help
deleteShare
deleteSave
Abstract

Abstract

En 中文
Code representation aims to transform source code into mathematical or vector forms to support models in processing and analyzing code. The data flow in code represents the information about how variables are passed and manipulated within the code. Existing research on data flow-oriented code representation primarily utilizes the semantic information of variables in the data flow to guide the model in representing code. However, the semantic information of variables is insufficient to reveal the structural features of the code, making it difficult for the model to achieve a comprehensive representation of the code. In this research, we propose a new code representation model, SDCR. Specifically, SDCR employs a specialized algorithm to identify the structural information of variables in the code and combines it with semantic information to enhance the understanding of codes. Meanwhile, SDCR introduces an attention mechanism to highlight the structural connections between variables. Additionally, SDCR employs a special mask matrix to enhance its ability to perceive code structure. The experimental results and analysis indicate that the proposed model has improved the relevant task metric scores by 2.6 points compared to the baseline model.
Keywords:
Code representation
Data flow
Structural information
Transformer

Journal

Journal of Supercomputing cover
Journal of Supercomputing
IF:
2.7
Papers:
1.2K
Citations:
1.0W

Organization

N
Northeastern Univ
Scholars:
2.9K
Papers: 1.3K
Citations: 362
Cited Papers

Cited Papers

Learning Phrase Representations using RNN Encoder–Decoder for Statistical Machine Translation
err2014-01-01
err0
errOAAI
errKyunghyun Cho; Bart van Merrienboer; Caglar Gulcehre; Dzmitry Bahdanau; Fethi Bougares; Holger Schwenk; Yoshua Bengio
errShare
errSave
CodeKGC: Code Language Model for Generative Knowledge Graph Construction
err2024-03-09
err0
errOAAI
errZhen Bi; Jing Chen; Yinuo Jiang; Feiyu Xiong; Wei Guo; Huajun Chen; Ningyu Zhang
errShare
errSave
Towards a Big Data Curated Benchmark of Inter-project Code Clones
err2014-09-01
err0
PREAI
errJeffrey Svajlenko; Judith F. Islam; Iman Keivanloo; Chanchal K. Roy; Mohammad Mamun Mia
errShare
errSave
An Empirical Study on Learning Bug-Fixing Patches in the Wild via Neural Machine Translation
err2019-09-02
err204
errOAAI
errTufano, Michele; Watson, Cody; Bavota, Gabriele; Di Penta, Massimiliano; White, Martin; Poshyvanyk, Denys
errShare
errSave
errShare
errSave
CodePlan: Repository-Level Coding using LLMs and Planning
err2024-07-12
err0
errOAAI
errRamakrishna Bairi; Atharv Sonwane; Aditya Kanade; Vageesh D. C.; Arun Iyer; Suresh Parthasarathy; Sriram Rajamani; B. Ashok; Shashank Shet
errShare
errSave
researcher View more