返回
Towards using visual, semantic and structural features to improve code readability classification
DOI:10.1016/j.jss.2022.111454.png)
摘要
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
期刊
IF:
4.1
论文数:
5.4K
被引数:
8.4K
机构
引用论文
THE MEANING AND USE OF THE AREA UNDER A RECEIVER OPERATING CHARACTERISTIC (ROC) CURVE受试者工作特征 (ROC) 曲线下面积的含义和用途
RADIOLOGY
IF15.2
SBA-15:TiO2 nanocomposites: II. Direct and post-synthesis using acetylacetoneSBA-15:TiO2纳米复合材料: II。使用乙酰丙酮的直接和后合成

