arrow
返回

Towards using visual, semantic and structural features to improve code readability classification

delete2022-11-01
delete7
PRE
AI
Q
Qing Mi
Y
Yiqun Hao
L
Liwei Ou
W
Wei Ma *
DOI:10.1016/j.jss.2022.111454delete
delete原文链接
delete原文求助
delete分享
delete收藏
摘要

摘要

En 中文
Context: Code readability, which correlates strongly with software quality, plays a critical role in software maintenance and evolvement. Although existing deep learning-based code readability models have reached a rather high classification accuracy, only structural features are utilized which inevitably limits their model performance. Objective: To address this problem, we propose to extract readability-related features from visual, semantic, and structural aspects from source code in an attempt to further improve code readability classification. Method: First, we convert a code snippet into a RGB matrix (for visual feature extraction), a token sequence (for semantic feature extraction) and a character matrix (for structural feature extraction). Then, we input them into a hybrid neural network that is composed of BERT, CNN, and BiLSTM for feature extraction. Finally, the extracted features are concatenated and input into a classifier to make a code readability classification. Result: A series of experiments are conducted to evaluate our method. The results show that the average accuracy could reach 85.3%, which outperforms all existing models. Conclusion: As an innovative work of extracting readability-related features automatically from visual, semantic, and structural aspects, our method is proved to be effective for the task of code readability classification. (c) 2022 Elsevier Inc. All rights reserved.
Keyword:
Code readability classification
Code representation
Neural networks
Program comprehension
Software analysis

期刊

Journal of Systems and Software 封面图
Journal of Systems and Software
IF:
4.1
论文数:
5.4K
被引数:
8.4K

机构

B
Beijing University of Technology
学者数:
2.8W
论文数: 2.1W
被引数: 2.7W
引用论文

引用论文

err分享
err收藏
Target-Dependent Sentiment Classification With BERT基于BERT的目标依赖情感分类
err2019-01-01
err250
errOAAI
errGao, Zhengjie; Feng, Ao; Song, Xinyu; Wu, Xi
err分享
err收藏
err分享
err收藏
Measuring Program Comprehension: A Large-Scale Field Study with Professionals
err2018-10-01
err195
errOAAI
errXia, Xin; Bao, Lingfeng; Lo, David; Xing, Zhenchang; Hassan, Ahmed E.; Li, Shanping
err分享
err收藏
err分享
err收藏
学者 查看更多内容