Abstract

Purpose: Code smells are residuals of technical debt induced by the developers. They hinder evolution, adaptability and maintenance of the software. Meanwhile, they are very beneficial in indicating the loopholes of problems and bugs in the software. Machine learning has been extensively used to predict Code Smells in research. The current study aims to optimise the prediction using Ensemble Learning and Feature Selection techniques on three open-source Java data sets. Design and Results: The work Compares four varied approaches to detect code smells using four performance measures Accuracy(P1), G-mean1 (P2), G-mean2 (P3), and F-measure (P4). The study found out that values of the performance measures did not degrade it instead of either remained same or increased with feature selection and Ensemble Learning. Random Forest turns out to be the best classifier while Correlation-based Feature selection(BFS) is best amongst Feature Selection techniques. Ensemble Learning aggregators, i.e. ET5C2 (BFS intersection Relief with classifier Random Forest), ET6C2 (BFS union Relief with classifier Random Forest), and ET5C1 (BFS intersection Relief with Bagging) and Majority Voting give best results from all the aggregation combinations studied. Conclusion: Though the results are good, but using Ensemble learning techniques needs a lot of validation for a variety of data sets before it can be standardised. The Ensemble Learning techniques also pose a challenge concerning diversity and reliability and hence needs exhaustive studies.

Highlights

  • Code smell was introduced by Kent Beck [1], which exhibits the issues that emanate as a consequence of the infringement of design specifications or programming errors

  • Twenty-one source code metrics have been collected with Chidamber and Kemerer Java Metrics tool (CKJM) tool [49], and six code smells have been collected with JCodOdor [48]

  • Three open-source java data sets have been used for code smell detection having a total of twenty-seven features

Read more

Summary

Introduction

Code smell was introduced by Kent Beck [1], which exhibits the issues that emanate as a consequence of the infringement of design specifications or programming errors. Several other studies suggest that the existence of smells heavily persuades fault proneness [4]–[7]. These smells hamper the maintainability and quality of the software developed [8]–[10]. These are the persuasive guidelines for developers to follow and can efficiently identify the atrocious areas that can lead to despondency in software programmers and the organization.

Methods
Results
Conclusion

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call

Disclaimer: All third-party content on this website/platform is and will remain the property of their respective owners and is provided on "as is" basis without any warranties, express or implied. Use of third-party content does not indicate any affiliation, sponsorship with or endorsement by them. Any references to third-party content is to identify the corresponding services and shall be considered fair use under The CopyrightLaw.