A MULTILANGUAGE COMPLEXITY MEASUREMENT TOOL FOR CODE QUALITY ASSESSMENT OF SOFTWARE USING CYCLOMATIC COMPLEXITY APPROACH

Authors

  • M. A. OGUNRINDE
  • O. S. AKINOLA

Keywords:

Code Quality, Software Maintenance, Multi-language, Software Stakeholders, Complexity Tool, Software Maintainability, Quality Assessment

Abstract

Code complexity or quality has been a focus point by software stakeholders, and on several occasions, has led to the abandonment of codes that has consumed time and money to develop. However, tools that measure code complexity and predict future maintenance across some development platforms before deployment are inadequate. This study was designed to develop a Complexity Measurement Tool (CMT) for assessing code quality in different platforms and compare its performance with that of an existing complexity tool. McCabe cyclomatic complexity approach was adopted and the CMT was developed using C# language to support four programming languages: C, C++, C# and JavaScript.  The tool adopted source codes written in any of the above-mentioned programming languages as input, scanned through and reported names of each method contained in the source program, their code lines, the complexity of each of the method and also specified the equivalent category of the complexity value. The performance of CMT was compared with Code Metrics (CM), an existing complexity equivalent tool embedded in Visual Studio (VS) environment using System’s Computational Time (SCT) and result representations. The average SCT obtained from CMT and CM for all the codes were 1.0±0.01 and 3.0±0.01 minutes. The complexity measurement tool with cyclomatic complexity category had better speed and result interpretation. This will assist software developers in building quality into their products. The result from the tool can also be used in making critical decisions by software stakeholders.

 

 

References

Alenezi, M., Zarour, M. 2020. On the Relationship between Software Complexity and Security. International Journal of Software Engineering & Applications 11(1): 51–60. https://doi.org/10.5121/ijsea.2020.11104

Antinyan, V., Staron, M., Hansson, J., Meding, W., Österström, P., Henriksson, A. 2014. Monitoring evolution of code complexity and magnitude of changes. Acta Cybernetica 21(3): 367–382. https://doi.org/10.14232/actacyb.21.3.2014.6

Antinyan, V., Staron, M., Meding, W., Österström, P., Bergenwall, H., Wranker, J., Hansson, J., Henriksson, A. 2013. Monitoring evolution of code complexity in agile/lean software development: A case study at two companies. 13th Symposium on Programming Languages and Software Tools, SPLST pp.1–15.

Ardito, L., Coppola, R., Barbato, L., Verga, D. 2020. A Tool-Based Perspective on Software Code Maintainability Metrics: A Systematic Literature Review. Scientific Programming https://doi.org/10.1155/2020/8840389

De Silva, D. I. , Kodagoda, N., Perera, H. 2012. Applicability of three complexity metrics. In International Conference on Advances in ICT for Emerging Regions (ICTer2012), Colombo pp. 82–88.

Debbarma, M. K., Debbarma, S., Debbarma, N., Chakma, K., Jamatia, A. 2013. A Review and Analysis of Software Complexity Metrics in Structural Testing. International Journal of Computer and Communication Engineering 2(2): 129–133.

Delange, J. 2015. Evaluating and Mitigating the Impact of Complexity in Software Models. http://www.sei.cmu.edu

Gil, J. Y., Lalouche, G. 2016. When do software complexity metrics mean nothing?-When examined out of context. Journal of Object Technology 15(1): 1–25. https://doi.org/10.5381/jot.2016.15.5.a2

Gujar, C. R. 2019. Use and Analysis on Cyclomatic Complexity in Software Development. International Journal of Computer Applications Technology and Research 8(5): 153–156. https://doi.org/10.7753/ijcatr0805.1002

IEEE Computer Society 2014. IEEE Standard for Software Quality Assurance Processes- IEEE Std 730™-2014 (Revision of IEEE Std 730-2002)

Liu, H., Gong, X., Liao, L., Li, B. 2018. Evaluate How Cyclomatic Complexity Changes in the Context of Software Evolution. 2018 IEEE 42nd Annual Computer Software and Applications Conference (COMPSAC), 02, 756–761. https://doi.org/10.1109/COMPSAC.2018.10332

Madi, A., Zein, O. K., Kadry, S. 2013. On the improvement of cyclomatic complexity metric. International Journal of Software Engineering and Its Applications 7(2): 67–82.

Malhotra, M.P. 2015. Python Based Software for Calculating Cyclomatic Complexity. International Journal of Innovative Science, Engineering & Technology 2(3): 546–549.

Meirelles, P., Santos, C., Miranda, J., Kon, F., Terceiro, A., Chavez, C. 2010. A study of the relationships between source code metrics and attractiveness in free software projects. In Proceedings - 24th Brazilian Symposium on Software Engineering, SBES pp. 11–20. https://doi.org/10.1109/SBES.2010.27

Miguel, J. P., Mauricio, D., Glen, R. 2014. A Review of Software Quality Models for the Evaluation of Software Products. International Journal of Software Engineering & Applications 5(6): 31–53. https://doi.org/10.5121/ijsea.2014.5603

Mohamed, N., Fitriyah, R., Sulaiman, R., Rohana, W., Endut, W. 2013. The Use of Cyclomatic Complexity Metrics in Programming Performance ’ s Assessment. Procedia - Social and Behavioral Sciences, 90(InCULT 2012): 497–503. https://doi.org/10.1016/j.sbspro.2013.07.119

Ogheneovo, E. 2013. Software Maintenance and Evolution: The Implication for Software Development. West African Journal of Industrial and Academic Research 7(1): 81–92. Retrieved from http://www.ajol.info/index.php/wajiar/article/view/91395

Oliveira, C. D. De, Black, P. E., Fong, E. 2017. Impact of Code Complexity On Software Analysis. National Institute of Standards and Technology Kent Rochford.

Omri, S., Montag, P., Sinz, C. 2018. Static Analysis and Code Complexity Metrics as Early Indicators of Software Defects. Journal of Software Engineering and Applications 11: 153–166. https://doi.org/10.4236/jsea.2018.114010

Ostberg J., Wagner, S. 2014. On automatically collectable metrics for software maintainability evaluation, in Proceedings of the 2014 Joint Conference of the International Workshop on Software Measurement and the International Conference on Software Process And Product Measurement, Rotterdam, 'e Netherlands, October 2014

Pasrija, V., Kumar, S., Srivastava, P.R. 2012. Assessment of Software Quality: Choquet Integral Approach. 2nd International Conference on Communication, Computing & Security (ICCCS), 1: 153–162. https://doi.org/10.1016/j.protcy.2012.10.019

Serebrenik, A. 2011. Software metrics. 2IS55 Software Evolution, (2). Retrieved from http://www.win.tue.nl/~aserebre/2IS55/2013-2014/9.pdf

Surendra, K. 2020. Cyclomatic Complexity in Software Development, International Journal of Engineering Research & Technology (IJERT) 8(16): 46-47, NCSMSD – 2020.

Tashtoush, Y., Al-maolegi, M., Arkok, B. 2014. The Correlation among Software Complexity Metrics with Case Study. International Journal of Advanced Computer Research 4(2): 414–419. https://arxiv.org/pdf/1408.4523.pdf

Tombe, R., Okeyo, G. 2014. Cyclomatic Complexity Metrics for Software Architecture Maintenance Risk Assessment. International Journal of Computer Science and Mobile Computing 3(11): 89–101.

Ukić, N., Maras, J., Šerić, L. 2018. The influence of cyclomatic complexity distribution on the understandability of xtUML models. Software Quality Journal, 26(2): 273–319. https://doi.org/10.1007/s11219-016-9351-5

Downloads

Published

2022-11-18

Issue

Section

Articles