Skip to main content

Performance Analysis of Machine Learning Approaches in Software Complexity Prediction

  • Conference paper
  • First Online:
Proceedings of International Conference on Trends in Computational and Cognitive Engineering

Abstract

Software design is one of the core concepts in software engineering. This covers insights and intuitions of software evolution, reliability, and maintainability. Effective software design facilitates software reliability and better quality management during development which reduces software development cost. Therefore, it is required to detect and maintain these issues earlier. Class complexity is one of the ways of detecting software quality. The objective of this paper is to predict class complexity from source code metrics using machine learning (ML) approaches and compare the performance of the approaches. In order to do that, we collect ten popular and quality maintained open source repositories and extract 18 source code metrics that relate to complexity for class-level analysis. First, we apply statistical correlation to find out the source code metrics that impact most on class complexity. Second, we apply five alternative ML techniques to build complexity predictors and compare the performances. The results report that the following source code metrics: Depth inheritance tree (DIT), response for class (RFC), weighted method count (WMC), lines of code (LOC), and coupling between objects (CBO) have the most impact on class complexity. Also, we evaluate the performance of the techniques, and results show that random forest (RF) significantly improves accuracy without providing additional false negative or false positive that work as false alarms in complexity prediction.

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

Access this chapter

Subscribe and save

Springer+ Basic
EUR 32.99 /Month
  • Get 10 units per month
  • Download Article/Chapter or Ebook
  • 1 Unit = 1 Article or 1 Chapter
  • Cancel anytime
Subscribe now

Buy Now

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 169.00
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 219.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

Institutional subscriptions

Similar content being viewed by others

References

  1. Alakus, T.B., Das, R., Turkoglu, I.: An overview of quality metrics used in estimating software faults. In: 2019 International Artificial Intelligence and Data Processing Symposium (IDAP), pp. 1–6. IEEE (2019)

    Google Scholar 

  2. Ogheneovo, E.E., et al.: On the relationship between software complexity and maintenance costs. J. Comput. Commun. 2(14), 1 (2014)

    Google Scholar 

  3. Yu, S., Zhou, S.: A survey on metric of software complexity. In: 2010 2nd IEEE International Conference on Information Management and Engineering, pp. 352–356. IEEE (2010)

    Google Scholar 

  4. Reza, S.M., Rahman, M.M., Parvez, M.H., Shamim Kaiser, M., Mamun, S.A.: Innovative approach in web application effort & cost estimation using functional measurement type. In: 2015 International Conference on Electrical Engineering and Information Communication Technology (ICEEICT), pp. 1–7. IEEE (2015)

    Google Scholar 

  5. Durdik, Z., Klatt, B., Koziolek, H., Krogmann, K., Stammel, J., Weiss, R.: Sustainability guidelines for long-living software systems. In: 2012 28th IEEE International Conference on Software Maintenance (ICSM), pp. 517–526. IEEE (2012)

    Google Scholar 

  6. Reza, S.M., Rahman, M.M., Mamun, S.A.: A new approach for road networks-a vehicle xml device collaboration with big data. In: 2014 International Conference on Electrical Engineering and Information & Communication Technology, pp. 1–5. IEEE (2014)

    Google Scholar 

  7. Bhattacharya, P., Iliofotou, M., Neamtiu, I., Faloutsos, M.: Graph-based analysis and prediction for software evolution. In: 2012 34th International Conference on Software Engineering (ICSE), pp. 419–429. IEEE (2012)

    Google Scholar 

  8. Paul, M.C., Sarkar, S., Rahman, M.M., Reza, S.M., Shamim Kaiser, M.: Low cost and portable patient monitoring system for e-health services in Bangladesh. In: 2016 International Conference on Computer Communication and Informatics (ICCCI), pp. 1–4. IEEE (2016)

    Google Scholar 

  9. Moreno-León, J., Robles, G., Román-González, M.: Comparing computational thinking development assessment scores with software complexity metrics. In: 2016 IEEE Global Engineering Education Conference (EDUCON), pp. 1040–1045. IEEE (2016)

    Google Scholar 

  10. Singh, G., Singh, Dilbag, Singh, V.: A study of software metrics. IJCEM Int. J. Comput. Eng. Manage. 11, 22–27 (2011)

    MATH  Google Scholar 

  11. Chowdhury, I., Zulkernine, M.: Using complexity, coupling, and cohesion metrics as early indicators of vulnerabilities. J. Syst. Arch. 57(3), 294–313 (2011)

    Article  Google Scholar 

  12. Subramanyam, R., Krishnan, Mayuram S.: Empirical analysis of ck metrics for object-oriented design complexity: implications for software defects. IEEE Trans. Softw. Eng. 29(4), 297–310 (2003)

    Article  Google Scholar 

  13. Moshtari, S., Sami, A., Azimi, M.: Using complexity metrics to improve software security. Comput. Fraud Sec. 2013(5), 8–17 (2013)

    Article  Google Scholar 

  14. Rahman, S., Sharma, T., Reza, S.M., Rahman, M.M., Kaiser, M.S., et al.: Pso-nf based vertical handoff decision for ubiquitous heterogeneous wireless network (uhwn). In: 2016 International Workshop on Computational Intelligence (IWCI), pp. 153–158. IEEE (2016)

    Google Scholar 

  15. Briand, L.C., Wüst, J., Daly, J.W., Victor Porte, D.: Exploring the relationships between design measures and software quality in object-oriented systems. J. Syst. Softw. 51(3), 245–273 (2000)

    Google Scholar 

  16. Gegick, M., Williams, L., Osborne, J., Vouk, M.: Prioritizing software security fortification throughcode-level metrics. In: Proceedings of the 4th ACM workshop on Quality of protection, QoP ’08, pp. 31–38. Association for Computing Machinery, New York, NY, USA, Oct 2008

    Google Scholar 

  17. Munappy, A., Bosch, J., Olsson, H.H., Arpteg, A., Brinne, B.: Data management challenges for deep learning. In: 2019 45th Euromicro Conference on Software Engineering and Advanced Applications (SEAA), pp. 140–147. IEEE (2019)

    Google Scholar 

  18. Reza, S.M., Badreddin, O., Rahad, K.: Modelmine: a tool to facilitate mining models from open source repositories. In: 2020 ACM/IEEE 23rd International Conference on Model Driven Engineering Languages and Systems (MODELS). ACM (2020)

    Google Scholar 

  19. Shaheen, A., Qamar, U., Nazir, A., Bibi, R., Ansar, M., Zafar, I.: Oocqm: object oriented code quality meter. In: International Conference on Computational Science/Intelligence & Applied Informatics, pp. 149–163. Springer (2019)

    Google Scholar 

  20. Zhang, Y., Lo, D., Xia, X., Xu, B., Sun, J., Li, S.: Combining software metrics and text features for vulnerable file prediction. In: 2015 20th International Conference on Engineering of Complex Computer Systems (ICECCS), pp. 40–49. IEEE (2015)

    Google Scholar 

  21. Jimenez, M., Rwemalika, R., Papadakis, M., Sarro, F., Traon, Y.L., Harman, M.: The importance of accounting for real-world labelling when predicting software vulnerabilities. In: Proceedings of the 2019 27th ACM Joint Meeting on European Software Engineering Conference and Symposium on the Foundations of Software Engineering, pp. 695–705 (2019)

    Google Scholar 

  22. Yadav, S., Shukla, S.: Analysis of k-fold cross-validation over hold-out validation on colossal datasets for quality classification. In: 2016 IEEE 6th International Conference on Advanced Computing (IACC), pp. 78–83. IEEE (2016)

    Google Scholar 

  23. Chowdhury, I., Zulkernine, M.: Can complexity, coupling, and cohesion metrics be used as early indicators of vulnerabilities? In: Proceedings of the 2010 ACM Symposium on Applied Computing, pp. 1963–1969 (2010)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Md. Mahfujur Rahman .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2021 The Author(s), under exclusive license to Springer Nature Singapore Pte Ltd.

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Moshin Reza, S., Mahfujur Rahman, M., Parvez, H., Badreddin, O., Al Mamun, S. (2021). Performance Analysis of Machine Learning Approaches in Software Complexity Prediction. In: Kaiser, M.S., Bandyopadhyay, A., Mahmud, M., Ray, K. (eds) Proceedings of International Conference on Trends in Computational and Cognitive Engineering. Advances in Intelligent Systems and Computing, vol 1309. Springer, Singapore. https://doi.org/10.1007/978-981-33-4673-4_3

Download citation

Publish with us

Policies and ethics