Skip to main content

Android Smells Detection Using ML Algorithms with Static Code Metrics

  • Conference paper
  • First Online:

Part of the book series: Communications in Computer and Information Science ((CCIS,volume 1229))

Abstract

Mobile applications development rate is predominantly increasing in comparison with the regular applications. These mobile applications prove to be change frequently according to the user requirements. Moreover, these changes in the code base may introduce some bad design practices that are called as bad smells, which can lead to a higher maintenance cost and degrade quality of the software. A very less attention has been given in the detection of code smells in the mobile applications that are also called as android smells. This research contains the rules in combination of software metrics and their threshold values to detect the bad smells in the android applications. The proposed rules are computed using three different machine learning algorithms. This framework has been applied to 2896 instances of the android applications which are open-sourced on GitHub. The android code smells MIM, LIC, DTWC and SL have been considered for the generation of detection rules and are validated using 10-fold cross validation method. The machine learning algorithm JRip furnished the best result for the android smells up to 90% overall precision, which is quite sufficient to justify the results.

This is a preview of subscription content, log in via an institution.

Buying options

Chapter
USD   29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD   39.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD   54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Learn about institutional subscriptions

References

  1. Belle, A.B.: Estimation and prediction of technical debt: a proposal. arXiv preprint arXiv:1904.01001 (2019)

  2. Brown, W.H., Malveau, R.C., McCormick, H.W., Mowbray, T.J.: AntiPatterns: Refactoring Software, Architectures, and Projects in Crisis. Wiley, New York (1998)

    Google Scholar 

  3. Cruz, L., Abreu, R.: Using automatic refactoring to improve energy efficiency of android apps. arXiv preprint arXiv:1803.05889 (2018)

  4. Cunningham, W.: The WyCash portfolio management system. ACM SIGPLAN OOPS Messenger 4(2), 29–30 (1993)

    Article  Google Scholar 

  5. Fontana, F.A., Braione, P., Zanoni, M.: Automatic detection of bad smells in code: an experimental assessment. J. Object Technol. 11(2), 5:1–38 (2012)

    Google Scholar 

  6. Fowler, M.: Refactoring: Improving the Design of Existing Code. Addison-Wesley Professional, Boston (2018)

    MATH  Google Scholar 

  7. Gupta, A., Suri, B., Kumar, V., Misra, S., Blažauskas, T., Damaševičius, R.: Software code smell prediction model using Shannon, Rényi and Tsallis entropies. Entropy 20(5), 372 (2018)

    Article  Google Scholar 

  8. Habchi, S., Moha, N., Rouvoy, R.: The rise of android code smells: who is to blame? In: Proceedings of the 16th International Conference on Mining Software Repositories, pp. 445–456. IEEE Press (2019)

    Google Scholar 

  9. Hecht, G., Benomar, O., Rouvoy, R., Moha, N., Duchien, L.: Tracking the software quality of android applications along their evolution (T). In: 2015 30th IEEE/ACM International Conference on Automated Software Engineering (ASE), pp. 236–247. IEEE (2015)

    Google Scholar 

  10. Hecht, G., Rouvoy, R., Moha, N., Duchien, L.: Detecting antipatterns in android apps. In: Proceedings of the Second ACM International Conference on Mobile Software Engineering and Systems, pp. 148–149. IEEE Press (2015)

    Google Scholar 

  11. Husien, H.K., Harun, M.F., Lichter, H.: Towards a severity and activity based assessment of code smells. Procedia Comput. Sci. 116, 460–467 (2017)

    Article  Google Scholar 

  12. Kessentini, M., Ouni, A.: Detecting android smells using multi-objective genetic programming. In: Proceedings of the 4th International Conference on Mobile Software Engineering and Systems, pp. 122–132. IEEE Press (2017)

    Google Scholar 

  13. Kumar, N.A., Krishna, K.H., Manjula, R.: Challenges and best practices in mobile application development. Imp. J. Interdisc. Res. 2, 12 (2016)

    Google Scholar 

  14. Lim, D.: Detecting code smells in android applications (2018)

    Google Scholar 

  15. Mannan, U.A., Ahmed, I., Almurshed, R.A.M., Dig, D., Jensen, C.: Understanding code smells in android applications. In: 2016 IEEE/ACM International Conference on Mobile Software Engineering and Systems (MOBILESoft), pp. 225–236. IEEE (2016)

    Google Scholar 

  16. Tufano, M., et al.: When and why your code starts to smell bad. In: 37th IEEE/ACM International Conference on Software Engineering, ICSE 2015, pp. 403–414. IEEE Computer Society Press (2015)

    Google Scholar 

  17. Oliveira, J., Viggiato, M., Santos, M.F., Figueiredo, E., Marques-Neto, H.: An empirical study on the impact of android code smells on resource usage. In: SEKE, pp. 314–313 (2018)

    Google Scholar 

  18. Ozkaya, I., Kruchten, P., Nord, R.L., Brown, N.: Managing technical debt in software development: report on the 2nd international workshop on managing technical debt, held at ICSE 2011. ACM SIGSOFT Softw. Eng. Notes 36(5), 33–35 (2011)

    Article  Google Scholar 

  19. Palomba, F., Di Nucci, D., Panichella, A., Zaidman, A., De Lucia, A.: Lightweight detection of android-specific code smells: the adoctor project. In: 2017 IEEE 24th International Conference on Software Analysis, Evolution and Reengineering (SANER), pp. 487–491. IEEE (2017)

    Google Scholar 

  20. Palomba, F., Di Nucci, D., Panichella, A., Zaidman, A., De Lucia, A.: On the impact of code smells on the energy consumption of mobile applications. Inf. Softw. Technol. 105, 43–55 (2019)

    Article  Google Scholar 

  21. Parikh, G.: The Guide to Software Maintenance. Winthrop, Cambridge (1982)

    Google Scholar 

  22. Reimann, J., Brylski, M., Aßmann, U.: A tool-supported quality smell catalogue for android developers. In: Proceedings of the Conference Modellierung 2014 in the Workshop Modellbasierte und modellgetriebene Softwaremodernisierung-MMSM, vol. 2014 (2014)

    Google Scholar 

  23. Roy, C.K., Cordy, J.R.: A survey on software clone detection research. Queen’s Sch. Comput. TR 541(115), 64–68 (2007)

    Google Scholar 

  24. Saifan, A.A., Al-Rabadi, A.: Evaluating maintainability of android applications. In: 2017 8th International Conference on Information Technology (ICIT), pp. 518–523. IEEE (2017)

    Google Scholar 

  25. Zhang, M., Hall, T., Baddoo, N.: Code bad smells: a review of current knowledge. J. Softw. Maint. Evol.: Res. Pract. 23(3), 179–202 (2011)

    Article  Google Scholar 

  26. Zhu, D., Xi, T.: Permission-based feature scaling method for lightweight android malware detection. In: Douligeris, C., Karagiannis, D., Apostolou, D. (eds.) KSEM 2019. LNCS (LNAI), vol. 11775, pp. 714–725. Springer, Cham (2019). https://doi.org/10.1007/978-3-030-29551-6_63

    Chapter  Google Scholar 

  27. Flaten, H.K., St Claire, C., Schlager, E., Dunnick, C.A., Dellavalle, R.P.: Growth of mobile applications in dermatology-2017 update. Dermatol. Online J. 24, 2 (2018)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Aakanshi Gupta .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2020 Springer Nature Singapore Pte Ltd.

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Gupta, A., Suri, B., Bhat, V. (2020). Android Smells Detection Using ML Algorithms with Static Code Metrics. In: Batra, U., Roy, N., Panda, B. (eds) Data Science and Analytics. REDSET 2019. Communications in Computer and Information Science, vol 1229. Springer, Singapore. https://doi.org/10.1007/978-981-15-5827-6_6

Download citation

  • DOI: https://doi.org/10.1007/978-981-15-5827-6_6

  • Published:

  • Publisher Name: Springer, Singapore

  • Print ISBN: 978-981-15-5826-9

  • Online ISBN: 978-981-15-5827-6

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics