A Novel Tree-based Neural Network for Android Code Smells Detection

Jing Yu,Chenguang Mao,Xiaojun Ye
DOI: https://doi.org/10.1109/qrs54544.2021.00083
2021-01-01
Abstract:The quality of mobile applications has received broad attention due to the booming development of mobile devices. Detection of Android code smells to refactor codes is an effective way to eliminate potential risks of applications. Besides traditional methods based on manually selected features, deep learning models provide an additional perspective of detection solutions. Though deep learning models are dispensed with artificial decisions, the paucity of dedicated datasets in Android code smells. The inadequate embedded syntax and semantics information acquired from source codes by token-based neural networks become new challenges. These obstacles will seriously affect the prediction performance of models. This paper put forward ACS-TNN, a novel Tree-based Neural Network approach for Android Code Smells detection. ACS-TNN took advantage of RvNN and LSTM while introducing ASTs for the first time in order to retain maximum semantic and structural information for extracting features of source codes. We constructed a dataset from practical open-source Android projects and labeled Java files data with popular Android code smells. The dataset would help researchers to train and test their deep learning models. Numerous experiments were conducted to investigate the prediction performance of ACS-TNN. The conclusions were that compared with two state-of-the-art token-based deep neural networks and another natural language tree-based model, ACS-TNN gained the best prediction performance. Further, ACS-TNN and our dataset are conducive to the maintenance of mobile applications.
What problem does this paper attempt to address?