• Complex
  • Title
  • Keyword
  • Abstract
  • Scholars
  • Journal
  • ISSN
  • Conference
搜索

Author:

Mi, Q. (Mi, Q..) | Zhan, Y. (Zhan, Y..) | Weng, H. (Weng, H..) | Bao, Q. (Bao, Q..) | Cui, L. (Cui, L..) | Ma, W. (Ma, W..)

Indexed by:

EI Scopus SCIE

Abstract:

Context: Code readability is crucial for developers since it is closely related to code maintenance and affects developers’ work efficiency. Code readability classification refers to the source code being classified as pre-defined certain levels according to its readability. So far, many code readability classification models have been proposed in existing studies, including deep learning networks that have achieved relatively high accuracy and good performance. Objective: However, in terms of representation, these methods lack effective preservation of the syntactic and semantic structure of the source code. To extract these features, we propose a graph-based code representation method. Method: Firstly, the source code is parsed into a graph containing its abstract syntax tree (AST) combined with control and data flow edges to reserve the semantic structural information and then we convert the graph nodes’ source code and type information into vectors. Finally, we train our graph neural networks model composing Graph Convolutional Network (GCN), DMoNPooling, and K-dimensional Graph Neural Networks (k-GNNs) layers to extract these features from the program graph. Result: We evaluate our approach to the task of code readability classification using a Java dataset provided by Scalabrino et al. (2016). The results show that our method achieves 72.5% and 88% in three-class and two-class classification accuracy, respectively. Conclusion: We are the first to introduce graph-based representation into code readability classification. Our method outperforms state-of-the-art readability models, which suggests that the graph-based code representation method is effective in extracting syntactic and semantic information from source code, and ultimately improves code readability classification. © 2023, The Author(s), under exclusive licence to Springer Science+Business Media, LLC, part of Springer Nature.

Keyword:

Code representation Abstract syntax tree Graph neural network Program comprehension Code readability classification

Author Community:

  • [ 1 ] [Mi Q.]Faculty of Information Technology, Beijing University of Technology, Beijing, China
  • [ 2 ] [Zhan Y.]Faculty of Information Technology, Beijing University of Technology, Beijing, China
  • [ 3 ] [Weng H.]Faculty of Information Technology, Beijing University of Technology, Beijing, China
  • [ 4 ] [Bao Q.]Faculty of Information Technology, Beijing University of Technology, Beijing, China
  • [ 5 ] [Cui L.]Faculty of Information Technology, Beijing University of Technology, Beijing, China
  • [ 6 ] [Ma W.]Faculty of Information Technology, Beijing University of Technology, Beijing, China

Reprint Author's Address:

Email:

Show more details

Related Keywords:

Related Article:

Source :

Empirical Software Engineering

ISSN: 1382-3256

Year: 2023

Issue: 4

Volume: 28

ESI Discipline: COMPUTER SCIENCE;

ESI HC Threshold:19

Cited Count:

WoS CC Cited Count:

SCOPUS Cited Count: 4

ESI Highly Cited Papers on the List: 0 Unfold All

WanFang Cited Count:

Chinese Cited Count:

30 Days PV: 9

Affiliated Colleges:

Online/Total:149/10623322
Address:BJUT Library(100 Pingleyuan,Chaoyang District,Beijing 100124, China Post Code:100124) Contact Us:010-67392185
Copyright:BJUT Library Technical Support:Beijing Aegean Software Co., Ltd.