Font Size: a A A

Member Ignoring Method Detection Approach Based On Ensemble Learning

Posted on:2022-11-16Degree:MasterType:Thesis
Country:ChinaCandidate:L Y WangFull Text:PDF
GTID:2518306749958229Subject:Automation Technology
Abstract/Summary:PDF Full Text Request
Code smells,known as bad smells,are low-quality snippers in source codes.A large number of smells in a software system is associated with a high level of technical debt hampering the system's maintenance and evolution.With the rapid development of mobile communication technology,mobile software applications have experienced exceptional and exponential growth around the globe.Research shows that Android applications can be affected by traditional Object-Oriented code smells,but also by new categories of emerging Android-specific code smells.The presence of these smells can lead to resource leaks(e.g.CPU,memory,battery,etc)causing,therefore,several performance and usability problems.The catalog of Android-specific code smell composes of 30 kinds of smells.This paper focuses on one of them,Member Ignoring Method,to investigate its automatic detection method.Compared with other kinds of Android smells,member ignoring method smell has maximum occurrences in Android apps,and the research community has focused more on studying this kind of smell as well.Member ignoring method smells are non-empty and non-static methods that do not access any internal properties of the class.The method overrides an inherited method is not member ignoring method smell as well.This kind of smell may threat several non-functional attributes of mobile apps,such as energy consumption and maintenance.The existing state-of-the-art method developed to detect this kind of smell is based on program static analysis.This kind of metric-based smell detection method takes source code as input,and detects smells by applying appropriate thresholds.However,rules/heuristics-based smell detection methods may cause many false positives and false negatives when detecting smells.In recent years,with the successful application of machine learning in various fields,scholars in the field of software engineering have used machine learning to detect code smells in order to solve problems in the traditional software engineering field,and have achieved good results.Machine learning is to directly input the results into the model,and use machine learning rules to continuously improve its own performance through multiple rounds of training to achieve the purpose of improving detection accuracy.However,existing research only focuses on traditional object-oriented code smells,and there is no relevant research on detecting Android-specific code smells using machine learning algorithms.So,can machine learning models be used to detect Android-specific code smells? If so,how well does it detect? Which machine learning model has the best detection performance? Is it better than traditional static program analysis-based detection methods? unknown.In view of the above problems,this paper proposes a method detection strategy based on ensemble learning that ignores members.The main research work and contributions of this paper are as follows:(1)A method of constructing positive and negative samples based on Android open source code is proposed and the tool ASSD is implemented to realize automatic completion from odor detection to sample generation.(2)A method detection strategy of Member Ignoring Method based on machine learning is proposed.Combining code metrics with program text information as a feature set,6 machine learning models are used for detection.The experimental results show that the detection performance of the models that take code metrics and text information together as feature inputs is mostly better than that of models that only take a single feature as input.In addition,the method proposed in this paper is significantly better than the existing detection methods,which can improve the accuracy of odor detection.(3)Member Ignoring Method based on Stacking ensemble learning is proposed.The experimental results show that,compared with a single machine learning model,the detection effect of the Stacking ensemble learning model is better,and it is also better than the existing detection methods based on static program analysis.
Keywords/Search Tags:Android-specific code smell, member ignoring method, machine learning, ensemble learning, stacking
PDF Full Text Request
Related items