Skip to main content

Code Quality Metrics for Functional Features in Modern Object-Oriented Languages

  • Conference paper
  • First Online:
Composability, Comprehensibility and Correctness of Working Software (CEFP 2019)

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 11950))

Included in the following conference series:

  • 120 Accesses

Abstract

The evolution of main-stream object-oriented languages such as Java and C# has introduced new code constructs that originate from the functional programming paradigm. We hypothesise that a relationship exists between the usage of these constructs and the error-proneness of code. We define a number of measures specifically focusing on functional programming constructs in the context of object-oriented languages. Based on these measures we define a metric that relates the usage of the functional programming constructs to error-proneness of classes. We validate our metric and confirm our hypothesis using an established methodology for empirical validation of code metrics. Our results presented in this paper grant new insights into the evolution of (increasingly) multi-paradigm programming languages at the cross-roads of the functional and the object-oriented programming paradigms.

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

Access this chapter

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

References

  1. Carbonnelle, P.: PYPL. http://pypl.github.io/PYPL.html. Accessed 11 Jan 2019

  2. Oracle: Java 8 update notes. https://www.oracle.com/technetwork/java/javase/8-whats-new-2157071.html. Accessed 11 Jan 2019

  3. Microsoft: C# update notes. https://docs.microsoft.com/en-us/dotnet/csharp/whats-new/csharp-version-history. Accessed 23 Jan 2019

  4. Wagner, B.: Language Integrated Query (LINQ). https://github.com/dotnet/cli (2017)

  5. Landkroon, E.: Code quality evaluation for the multi-paradigm programming language Scala. MSc Thesis, University of Amsterdam, Netherlands (2017)

    Google Scholar 

  6. Basili, V.R., Briand, L.C., Melo, W.L.: A validation of object-oriented design metrics as quality indicators. IEEE Trans. Softw. Eng. 22, 751–761 (1996)

    Article  Google Scholar 

  7. Heitlager, I., Kuipers, T., Visser, J.: A practical model for measuring maintainability. In: 6th International Conference on Quality of Information and Communications Technology (QUATIC 2007), pp. 30–39. IEEE (2007)

    Google Scholar 

  8. McCabe, T.J.: A complexity measure. IEEE Trans. Softw. Eng. 2, 308–320 (1976)

    Article  MathSciNet  MATH  Google Scholar 

  9. Ryder, C.: Software Measurement for Functional Programming. PhD thesis, University of Kent at Canterbury, United Kingdom (2004)

    Google Scholar 

  10. Ryder, C., Thompson, S.J.: Software metrics: measuring Haskell. In: 6th Symposium on Trends in Functional Programming (TFP 2005), pp. 31–46 (2005)

    Google Scholar 

  11. van den Berg, K.: Software measurement and functional programming. PhD thesis, University of Twente, Netherlands (1995)

    Google Scholar 

  12. Király, R., Kitlei, R.: Application of complexity metrics in functional languages. In: 8th Joint Conference on Mathematics and Computer Science (MaCS 2010), Selected Papers, pp. 267–282 (2010)

    Google Scholar 

  13. Briand, L., El Emam, K., Morasca, S.: Theoretical and empirical validation of software product measures. In: International Software Engineering Research Network, Technical Report ISERN-95-03 (1995)

    Google Scholar 

  14. Gyimothy, T., Ferenc, R., Siket, I.: Empirical validation of object-oriented metrics on open source software for fault prediction. IEEE Trans. Softw. Eng. 31, 897–910 (2005)

    Article  Google Scholar 

  15. Briand, L.C., Melo, W.L., Wust, J.: Assessing the applicability of fault-proneness models across object-oriented software projects. IEEE Trans. Softw. Eng. 28, 706–720 (2002)

    Article  Google Scholar 

  16. Hosmer, D.W., Jr., Lemeshow, S., Sturdivant, R.X.: Applied Logistic Regression. Wiley, Hoboken (2013)

    Book  MATH  Google Scholar 

  17. Lanubile, F., Visaggio, G.: Evaluating predictive quality models derived from software measures: lessons learned. J. Syst. Softw. 38, 225–234 (1997)

    Article  Google Scholar 

  18. Nguyen, V., Deeds-Rubin, S., Tan, T., Boehm, B.W.: A SLOC counting standard. In: COCOMO-II Forum, pp. 1–16 (2007)

    Google Scholar 

  19. Boehm, B.W., et al.: Software Cost Estimation with COCOMO-II. Prentice-Hall, Upper Saddle River (2000)

    Google Scholar 

  20. SonarQube: Metric definitions (2019). https://docs.sonarqube.org/latest/user-guide/metric-definitions/

  21. Chidamber, S.R., Kemerer, C.F.: A metrics suite for object-oriented design. IEEE Trans. Softw. Eng. 20, 476–493 (1994)

    Article  Google Scholar 

  22. Stone, M.: Cross-validatory choice and assessment of statistical predictions. J. Royal Stat. Soc. Ser. B (Methodol.) 36, 111–133 (1974)

    MathSciNet  MATH  Google Scholar 

  23. Kohavi, R.: A study of cross-validation and bootstrap for accuracy estimation and model selection. In: 14th International Joint Conference on Artificial Intelligence (IJCAI 1995), pp. 1137–1145. Morgan Kaufmann (1995)

    Google Scholar 

  24. Sokolova, M., Lapalme, G.: A systematic analysis of performance measures for classification tasks. Inf. Process. Manag. 45, 427–437 (2009)

    Article  Google Scholar 

  25. GitHub: Closing issues using keywords (2019). https://help.github.com/en/articles/closing-issues-using-keywords

  26. https://github.com/dotnet/cli. Version: bf26e7976

  27. https://github.com/dotnet/machinelearning. Version: b8d1b501

  28. https://github.com/akkadotnet/akka.net. Version: bc5cc65a3

  29. https://github.com/aspnet/AspNetCore. Version: 5af8e170bc

  30. https://github.com/IdentityServer/IdentityServer4. Version: da143532

  31. https://github.com/jellyfin/jellyfin. Version: d7aaa1489

  32. https://github.com/OpenRA/OpenRA. Version: 27cfa9b1f

  33. https://github.com/0xd4d/dnSpy. Version: 3728fad9d

  34. https://github.com/icsharpcode/ILSpy. Version: 72c7e4e8

  35. https://github.com/Humanizr/Humanizer. Version: b3abca2

  36. https://github.com/aspnet/EntityFrameworkCore. Version: 5df258248

  37. Uesbeck, P.M., Stefik, A., Hanenberg, S., Pedersen, J., Daleiden, P.: An empirical study on the impact of C++ lambdas and programmer experience. In: 38th International Conference on Software Engineering (ICSE 2016), pp. 760–771. ACM (2016)

    Google Scholar 

  38. Finifter, M., Mettler, A., Sastry, N., Wagner, D.: Verifiable functional purity in Java. In: 15th ACM Conference on Computer and Communications Security (CCS 2008), pp. 161–174. ACM (2008)

    Google Scholar 

  39. Sharma, M., Gill, N., Sikka, S.: Survey of object-oriented metrics: focusing on validation and formal specification. ACM SIGSOFT Softw. Eng. Notes 37, 1–5 (2012)

    Google Scholar 

  40. Warmuth, D.: Validation of software measures for the functional programming language Erlang. MSc Thesis, Humboldt-Universität zu Berlin, Germany (2018)

    Google Scholar 

  41. Zuilhof, B., van Hees, R., Grelck, C.: Code quality metrics for the functional side of the object-oriented language C#. In: 12th Seminar on Advanced Techniques and Tools for Software Evolution (SATToSE 2019), CEUR Workshop Proceedings, vol. 2510, pp. 31–46 (2019)

    Google Scholar 

  42. Zuilhof, B.: Code quality metrics for the functional side of the object-oriented language C#. MSc Thesis, University of Amsterdam, Netherlands (2019)

    Google Scholar 

Download references

Acknowledgements

We would like to thank the anonymous reviewers for their valuable feedback and the Erasmus+ Strategic Partnership for Higher Education Focusing Education on Composability, Comprehensibility and Correctness of Working Software (FE3CWS/3COWS), project-ID 2017-1-SK01-KA203-035402, for their support.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Clemens Grelck .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2023 The Author(s), under exclusive license to Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Zuilhof, B., van Hees, R., Grelck, C. (2023). Code Quality Metrics for Functional Features in Modern Object-Oriented Languages. In: Porkoláb, Z., Zsók, V. (eds) Composability, Comprehensibility and Correctness of Working Software. CEFP 2019. Lecture Notes in Computer Science, vol 11950. Springer, Cham. https://doi.org/10.1007/978-3-031-42833-3_10

Download citation

  • DOI: https://doi.org/10.1007/978-3-031-42833-3_10

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-031-42832-6

  • Online ISBN: 978-3-031-42833-3

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics