Improving Code Readability Classification using Convolutional Neural Networks
Research output: Journal Publications and Reviews › RGC 21 - Publication in refereed journal › peer-review
Author(s)
Related Research Unit(s)
Detail(s)
Original language | English |
---|---|
Pages (from-to) | 60-71 |
Journal / Publication | Information and Software Technology |
Volume | 104 |
Online published | 10 Jul 2018 |
Publication status | Published - Dec 2018 |
Link(s)
Abstract
Context: Code readability classification (which refers to classification of a piece of source code as either readable or unreadable) has attracted increasing concern in academia and industry. To construct accurate classification models, previous studies depended mainly upon handcrafted features. However, the manual feature engineering process is usually labor-intensive and can capture only partial information about the source code, which is likely to limit the model performance.
Objective: To improve code readability classification, we propose the use of Convolutional Neural Networks (ConvNets).
Method: We first introduce a representation strategy (with different granularities) to transform source codes into integer matrices as the input to ConvNets. We then propose DeepCRM, a deep learning-based model for code readability classification. DeepCRM consists of three separate ConvNets with identical architectures that are trained on data preprocessed in different ways. We evaluate our approach against five state-of-the-art code readability models.
Results: The experimental results show that DeepCRM can outperform previous approaches. The improvement in accuracy ranges from 2.4% to 17.2%.
Conclusions: By eliminating the need for manual feature engineering, DeepCRM provides a relatively improved performance, confirming the efficacy of deep learning techniques in the task of code readability classification.
Objective: To improve code readability classification, we propose the use of Convolutional Neural Networks (ConvNets).
Method: We first introduce a representation strategy (with different granularities) to transform source codes into integer matrices as the input to ConvNets. We then propose DeepCRM, a deep learning-based model for code readability classification. DeepCRM consists of three separate ConvNets with identical architectures that are trained on data preprocessed in different ways. We evaluate our approach against five state-of-the-art code readability models.
Results: The experimental results show that DeepCRM can outperform previous approaches. The improvement in accuracy ranges from 2.4% to 17.2%.
Conclusions: By eliminating the need for manual feature engineering, DeepCRM provides a relatively improved performance, confirming the efficacy of deep learning techniques in the task of code readability classification.
Research Area(s)
- Code readability, Convolutional Neural Network, Deep learning, Empirical software engineering, Open source software, Program comprehension
Citation Format(s)
Improving Code Readability Classification using Convolutional Neural Networks. / Mi, Qing; Keung, Jacky; Xiao, Yan et al.
In: Information and Software Technology, Vol. 104, 12.2018, p. 60-71.
In: Information and Software Technology, Vol. 104, 12.2018, p. 60-71.
Research output: Journal Publications and Reviews › RGC 21 - Publication in refereed journal › peer-review