Learning Heterogeneous Abstract Code Graph Representations for Program Comprehension

Program comprehension is a fundamental activity in the field of software engineering. However, efficiently and accurately understanding source code poses significant chal-lenges, as source code with similar semantics can differ in syntax. Recent state-of-the-art research has demonstrated that combining deep learning techniques with structural information from source code, specifically AST-based static graphs, can en-hance the extraction of essential features from source programs. Control flow and data flow information in source programs can express richer semantics while existing studies often overlook their heterogeneous integration when constructing program static graphs. This oversight results in the loss of information about the type of static graph edges, potentially impeding program comprehension. In this paper, We model the source program by using a heterogeneous static graph and then use Relational Graph Con-volutional Network (R-GCN) for feature extraction. Specifically, we present an innovative method for constructing a program static graph, termed the Heterogeneous Abstract Code Graph (HACG), and then we employ R-GCN to generate representations based on HACG for code classification and code clone detection. We evaluate our method using two extensive source code datasets: CodeNet, introduced by IBM, and BigCloneBench. The experimental results demonstrate the superiority of our approach over existing methods, achieving a code classification accuracy of 97.38 % and an average F1-score of 98.34 % in code clone detection.

Authors

Institutions

Publication Details

Published
2024-12-03
DOI
https://doi.org/10.1109/apsec65559.2024.00035
Primary Topic
Software Engineering Research
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Learning Heterogeneous Abstract Code Graph Representations for Program Comprehension

Huaxiao Liu, Shuang Li, Mengxi Zhang, Shenning Song
Software Engineering Research
article

Learning Heterogeneous Abstract Code Graph Representations for Program Comprehension

Huaxiao Liu, Shuang Li, Mengxi Zhang, Shenning Song
article en

Abstract

Program comprehension is a fundamental activity in the field of software engineering. However, efficiently and accurately understanding source code poses significant chal-lenges, as source code with similar semantics can differ in syntax. Recent state-of-the-art research has demonstrated that combining deep learning techniques with structural information from source code, specifically AST-based static graphs, can en-hance the extraction of essential features from source programs. Control flow and data flow information in source programs can express richer semantics while existing studies often overlook their heterogeneous integration when constructing program static graphs. This oversight results in the loss of information about the type of static graph edges, potentially impeding program comprehension. In this paper, We model the source program by using a heterogeneous static graph and then use Relational Graph Con-volutional Network (R-GCN) for feature extraction. Specifically, we present an innovative method for constructing a program static graph, termed the Heterogeneous Abstract Code Graph (HACG), and then we employ R-GCN to generate representations based on HACG for code classification and code clone detection. We evaluate our method using two extensive source code datasets: CodeNet, introduced by IBM, and BigCloneBench. The experimental results demonstrate the superiority of our approach over existing methods, achieving a code classification accuracy of 97.38 % and an average F1-score of 98.34 % in code clone detection.

Jilin University (CN), Jilin Province Science and Technology Department (CN)
Openalex Percentile: Top 52%
Software Engineering Research
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.