A Code Difference Extraction Method Based on Node Feature Enhancement

The analysis and understanding of source code changes play a crucial role in software maintenance, especially in tasks such as code review, software merging, and regression testing. Traditional text-based code difference extraction methods, such as git diff, typically only recognize insertions and deletions, neglecting the syntactic structure, which makes it difficult to effectively identify updates or movements. To address this issue, tree-based methods leverage the abstract syntax tree (AST) of the source code to generate fine-grained code differences, allowing for more accurate capture of structural changes in the code. However, existing difference extraction methods often overlook the semantic features of nodes, making it difficult to precisely identify node movements and updates. This paper proposes a code difference extraction method based on node feature enhancement, which introduces a node feature enhancement module and uses a neural network-based graph matching algorithm for node mapping. Experimental results show that the proposed method significantly improves both the accuracy and efficiency of code difference extraction.

Authors

Institutions

Publication Details

Published
2024-12-27
DOI
https://doi.org/10.1109/auteee62881.2024.10869796
Primary Topic
Natural Language Processing Techniques
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

A Code Difference Extraction Method Based on Node Feature Enhancement

Rongcheng Duan, Ke Wang, Zhang Ren, Lu Li
Natural Language Processing Techniques
article

A Code Difference Extraction Method Based on Node Feature Enhancement

Rongcheng Duan, Ke Wang, Zhang Ren, Lu Li
article en

Abstract

The analysis and understanding of source code changes play a crucial role in software maintenance, especially in tasks such as code review, software merging, and regression testing. Traditional text-based code difference extraction methods, such as git diff, typically only recognize insertions and deletions, neglecting the syntactic structure, which makes it difficult to effectively identify updates or movements. To address this issue, tree-based methods leverage the abstract syntax tree (AST) of the source code to generate fine-grained code differences, allowing for more accurate capture of structural changes in the code. However, existing difference extraction methods often overlook the semantic features of nodes, making it difficult to precisely identify node movements and updates. This paper proposes a code difference extraction method based on node feature enhancement, which introduces a node feature enhancement module and uses a neural network-based graph matching algorithm for node mapping. Experimental results show that the proposed method significantly improves both the accuracy and efficiency of code difference extraction.

Xidian University (CN)
Openalex Percentile: Top 75%
Natural Language Processing Techniques
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.

A Code Difference Extraction Method Based on Node Feature Enhancement — Rongcheng Duan, Ke Wang, et al. · (2024) | TGRS Research Map | TGRS