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.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
References
Carbonnelle, P.: PYPL. http://pypl.github.io/PYPL.html. Accessed 11 Jan 2019
Oracle: Java 8 update notes. https://www.oracle.com/technetwork/java/javase/8-whats-new-2157071.html. Accessed 11 Jan 2019
Microsoft: C# update notes. https://docs.microsoft.com/en-us/dotnet/csharp/whats-new/csharp-version-history. Accessed 23 Jan 2019
Wagner, B.: Language Integrated Query (LINQ). https://github.com/dotnet/cli (2017)
Landkroon, E.: Code quality evaluation for the multi-paradigm programming language Scala. MSc Thesis, University of Amsterdam, Netherlands (2017)
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)
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)
McCabe, T.J.: A complexity measure. IEEE Trans. Softw. Eng. 2, 308–320 (1976)
Ryder, C.: Software Measurement for Functional Programming. PhD thesis, University of Kent at Canterbury, United Kingdom (2004)
Ryder, C., Thompson, S.J.: Software metrics: measuring Haskell. In: 6th Symposium on Trends in Functional Programming (TFP 2005), pp. 31–46 (2005)
van den Berg, K.: Software measurement and functional programming. PhD thesis, University of Twente, Netherlands (1995)
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)
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)
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)
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)
Hosmer, D.W., Jr., Lemeshow, S., Sturdivant, R.X.: Applied Logistic Regression. Wiley, Hoboken (2013)
Lanubile, F., Visaggio, G.: Evaluating predictive quality models derived from software measures: lessons learned. J. Syst. Softw. 38, 225–234 (1997)
Nguyen, V., Deeds-Rubin, S., Tan, T., Boehm, B.W.: A SLOC counting standard. In: COCOMO-II Forum, pp. 1–16 (2007)
Boehm, B.W., et al.: Software Cost Estimation with COCOMO-II. Prentice-Hall, Upper Saddle River (2000)
SonarQube: Metric definitions (2019). https://docs.sonarqube.org/latest/user-guide/metric-definitions/
Chidamber, S.R., Kemerer, C.F.: A metrics suite for object-oriented design. IEEE Trans. Softw. Eng. 20, 476–493 (1994)
Stone, M.: Cross-validatory choice and assessment of statistical predictions. J. Royal Stat. Soc. Ser. B (Methodol.) 36, 111–133 (1974)
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)
Sokolova, M., Lapalme, G.: A systematic analysis of performance measures for classification tasks. Inf. Process. Manag. 45, 427–437 (2009)
GitHub: Closing issues using keywords (2019). https://help.github.com/en/articles/closing-issues-using-keywords
https://github.com/dotnet/cli. Version: bf26e7976
https://github.com/dotnet/machinelearning. Version: b8d1b501
https://github.com/akkadotnet/akka.net. Version: bc5cc65a3
https://github.com/aspnet/AspNetCore. Version: 5af8e170bc
https://github.com/IdentityServer/IdentityServer4. Version: da143532
https://github.com/jellyfin/jellyfin. Version: d7aaa1489
https://github.com/OpenRA/OpenRA. Version: 27cfa9b1f
https://github.com/0xd4d/dnSpy. Version: 3728fad9d
https://github.com/icsharpcode/ILSpy. Version: 72c7e4e8
https://github.com/Humanizr/Humanizer. Version: b3abca2
https://github.com/aspnet/EntityFrameworkCore. Version: 5df258248
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)
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)
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)
Warmuth, D.: Validation of software measures for the functional programming language Erlang. MSc Thesis, Humboldt-Universität zu Berlin, Germany (2018)
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)
Zuilhof, B.: Code quality metrics for the functional side of the object-oriented language C#. MSc Thesis, University of Amsterdam, Netherlands (2019)
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
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2023 The Author(s), under exclusive license to Springer Nature Switzerland AG
About this paper
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)