arrow
Return

Boosting source code learning with text-oriented data augmentation: an empirical study

delete2025-02-18
delete0
PRE
AI
Z
Zeming Dong
Q
Qiang Hu *
Y
Yuejun Guo
Z
Zhenya Zhang
M
Maxime Cordy
M
Mike Papadakis
Y
Yves Le Traon
J
Jianjun Zhao
DOI:10.1007/s10664-025-10624-2delete
deleteOriginal
deleteOriginal request for help
deleteShare
deleteSave
Abstract

Abstract

En 中文
Recent studies have demonstrated remarkable advancements in source code learning, which applies deep neural networks (DNNs) to tackle various software engineering tasks. Similar to other DNN-based domains, source code learning also requires massive high-quality training data to achieve the success of these applications. Data augmentation, a technique used to produce additional training data, is widely adopted in other domains (e.g. computer vision). However, the existing practice of data augmentation in source code learning is limited to simple syntax-preserved methods, such as code refactoring. In this paper, considering that source code can also be represented as text data, we take an early step to investigate the effectiveness of data augmentation methods originally designed for natural language texts in the context of source code learning. To this end, we focus on code classification tasks and conduct a comprehensive empirical study across four critical code problems and four DNN architectures to assess the effectiveness of 25 data augmentation methods. Our results reveal specific data augmentation methods that yield more accurate and robust models for source code learning. Additionally, we discover that the data augmentation methods remain beneficial even when they slightly break source code syntax.
Keywords:
Source code analysis
Data augmentation
Program transformation

Journal

Empirical Software Engineering cover
Empirical Software Engineering
IF:
3.6
Papers:
2.0K
Citations:
5.3K

Organization

T
tianjin university
Scholars:
7.9W
Papers: 5.7W
Citations: 88
L
luxembourg institute of science & technology
Scholars:
1.9K
Papers: 1.8K
Citations: 1
K
Kyushu University
Scholars:
3.2W
Papers: 2.6W
Citations: 2.8W
U
university of luxembourg
Scholars:
5.2K
Papers: 4.7K
Citations: 4
researcher View more organizations