The Application of Machine Learning in Android Code Smell Detection
Due to the limitations of existing code smell detection methods,it is difficult to accu-rately and efficiently detect the coexistence of code smells in Android code.In this regard,a ma-chine learning-based approach for detecting the coexistence of code smells in Android code is proposed.Firstly,a tool called ASSD is proposed and implemented to obtain well-separated posi-tive and negative sample sets.The textual information extracted from the source code is used as the input for the machine learning classifier,thus achieving the detection of code smell coexis-tence using machine learning.Comparative experiments are designed,and the results show that machine learning can effectively detect the coexistence of code smells in Android code,with sig-nificantly improved detection performance compared to existing static program analysis-based methods.Among them,the random forest model performs the best,with an F1 score improve-ment of 22%.
Machine Learningco-occurrences of code smellsAndroid code smells