Cognitive Complexity Applied to Software Development: An Automated Procedure to Reduce the Comprehension Effort

Authors

  • Dinuka R. Wijendra Department of Information Technology, Sri Lanka Institute of Information Technology, SLIIT Malabe Campus, New Kandy Rd, Malabe 10115, Sri Lanka
  • K. P. Hewagamage Department of Information Engineering, University of Colombo School of Computing, UCSC Building Complex, 35 Reid Avenue, Colombo 00700, Sri Lanka

DOI:

https://doi.org/10.5614/itbj.ict.res.appl.2022.16.3.6

Keywords:

cognitive complexity, cognitive load, comprehension, software development, subjectivity

Abstract

The cognitive complexity of a software application determines the amount of human effort required to comprehend its internal logic, which results in a subjective measurement. The quantification process of the cognitive complexity as a metric is problematic since the factors representing the computation do not represent the exact human cognition. Therefore, the determination of cognitive complexity requires expansion beyond its quantification. The human comprehension effort related with a software application is associated with each phase of its development process. Correct requirements identification and accurate logical diagram generation prior to code implementation can lead to proper logical identification of software applications. Moreover, human comprehension is essential for software maintenance. Defect identification, correction and handling of code quality issues cannot be maintained without good comprehension. Therefore, cognitive complexity can be effectively applied to demonstrate human understandability inside the respective phases of requirements analysis, design, defect tracking, and code quality optimization. This study involved automation of the above-mentioned phases to reduce the manual human cognitive load and reduce cognitive complexity. It was found that the proposed system could enhance the average accuracy of requirements analysis and class diagram generation by 14.44% and 9.89% average accuracy incrementation through defect tracking and code quality issues compared to manual procedures.

Downloads

Download data is not yet available.

References

Campbell, G.A., Cognitive Complexity: An Overview and Evaluation, 2018 International Conference on Technical Debt, pp. 57-58, May 2018. DOI: 10.1145/3194164.3194186.

Misra, S., A Complexity Measure Based on Cognitive Weights, International Journal of Theoretical and Applied Computer Sciences, 1(1), pp. 1-10, 2006.

Bar, M.M., Wyrich, M. & Wagner, S., An Empirical Validation of Cognitive Complexity as a Measure of Source Code Understandability, 14th ACM IEEE Int. Symp. Empir. Softw. Eng. Meas. ESEM, pp. 1-12, Oct. 2020. DOI: 10.1145/3382494.3410636.

Winter, M., Pryss, R., Probst, T., Bass, J. & Reichert, M., Measuring the Cognitive Complexity in the Comprehension of Modular Process Models, IEEE Trans. Cogn. Dev. Syst., pp. 1-18, 2020. DOI: 10.1109/TCDS.2020.3032730.

Xia, X., Bao, L., Lo, D., Xing, Z., Hassan, A.E. & Li, S., Measuring Program Comprehension: A Large-Scale Field Study with Professionals, IEEE Trans. Softw. Eng., 44(10), pp. 951-976, Oct. 2018. DOI: 10.1109/TSE.2017.2734091.

Saborido, R., Ferrer, J., Chicano, F. & Alba, E., Automatizing Software Cognitive Complexity Reduction, IEEE Access, 10, pp. 11642-11656, 2022. DOI: 10.1109/ACCESS.2022.3144743.

Campbell, G.A., A New Way of Measuring Understandability, SonarSource S A, 2016/2021.

Kushwaha, D.S. & Misra, A.K., Improved Cognitive Information Complexity Measure: A Metric that Establishes Program Comprehension Effort, ACM SIGSOFT Software Engineering Notes, 31(5), pp. 1-7, 2006. DOI: 10.1145/1163514.1163533

Wang, Y., On the Cognitive Complexity of Software and Its Quantification and Formal Measurement, Int. J. Softw. Sci. Comput. Intell., 1(2), pp. 31-53, Apr. 2009. DOI: 10.4018/jssci.2009040103.

Chhabra, J.K., Code Cognitive Complexity: A New Measure, The World Congress on Engineering, July 2011.

Gold, N.E., Mohan, A.M. & Layzell, P.J., Spatial Complexity Metrics: an Investigation of Utility, IEEE Trans. Softw. Eng., 31(3), pp. 203-212, Mar. 2005. DOI: 10.1109/TSE.2005.39.

Chhillar, U. & Bhasin, S., A New Weighted Composite Complexity Measure for Object-Oriented Systems, International Journal of Information and Communication Technology Research, 1(3), pp. 101-108, July 2011.

Misra, S., Adewumi, A., Fernandez-Sanz, L. & Damasevicius, R., A Suite of Object Oriented Cognitive Complexity Metrics, IEEE Access, 6, pp. 8782-8796, 2018, DOI: 10.1109/ACCESS.2018.2791344.

Gupta, V. & Chhabra, J. K., Object-Oriented Cognitive-Spatial Complexity Measures, the World Academy of Science, Engineering and Technology, 3(3), pp. 972-979, 2009, DOI: 10.5281/zenodo.1072347.

Misra, S. & Akman, I., Applicability of Weyuker?s Properties on OO Metrics: Some Misunderstandings, Comput. Sci. Inf. Syst., 5(1), pp. 17-23, 2008. DOI: 10.2298/CSIS0801017M.

Shao, J. & Wang, Y., A New Measure of Software Complexity Based on Cognitive Weights, Can. J. Electr. Comput. Eng., 28(2), pp. 69-74, Apr. 2003. DOI: 10.1109/CJECE.2003.1532511.

Misra, S., Koyuncu, M., Crasso, M., Mateos, C. & Zunino, A., A Suite of Cognitive Complexity Metrics, Computational Science and Its Applications, 7336, pp. 234-247, 2012. DOI: 10.1007/978-3-642-31128-4_17.

Misra, A.K., Evaluating Cognitive Complexity Measure with Weyuker Properties, Third IEEE International Conference on Cognitive Informatics, pp. 103-108, 2004, DOI: 10.1109/COGINF.2004.1327464.

Kushwaha, D.S. & Misra, A.K., Robustness Analysis of Cognitive Information Complexity Measure Using Weyuker Properties, ACM SIGSOFT Softw. Eng. Notes, 31(1), pp. 1-6, Jan. 2006, DOI: 10.1145/1108768.1108775.

Briand, L. C. & Morasca, S., Property Based Software Engineering Measurement, IEEE Trans. Softw. Eng., 22(1), pp. 68-86, Jan 1996, DOI: 10.1109/32.481535.

Scalabrino, S., Bavota, G., Vendome, Linares-Vasquez, M., Poshyvanyk, D. & Coliveto, R., Automatically Assessing Code Understandability, IEEE Trans. Softw. Eng., 47(3), pp. 595-613, Mar. 2021, DOI: 10.1109/TSE.2019.2901468.

Mishra, A. & Dubey, D., A Comparative Study Of Different Software Development Life Cycle Models in Different Scenarios, Int. J. Adv. Res. Comput. Sci. Manag. Stud., 1(5), pp. 64-69, Oct. 2013,

Rquez, L.M., Padro, L. & Rodriguez, H., A Machine Learning Approach to POS Tagging, Machine Learning, 39, pp. 59-91, 2000, DOI: 10.1023/A:1007673816718

Marquez, L., Rodriguez, H., Carmona, J. & Montolio, J., Improving Pos Tagging Using Machine-Learning Techniques, pp. 52-63. https://aclanthology.org/W99-0608.pdf, (8 March 2020)

Deeptimahanti, D.K. & Babar, M.A., An Automated Tool for Generating UML Models from Natural Language Requirements, IEEE/ACM International Conference on Automated Software Engineering, pp. 680?682, Nov. 2009. DOI: 10.1109/ASE.2009.48.

Pennington, J., Socher, R. & Manning, C., Glove: Global Vectors for Word Representation, Conference on Empirical Methods in Natural Language Processing (EMNLP), pp. 1532?1543, 2014. DOI: 10.3115/v1/D14-1162.

Li, B. & Han, L., Distance Weighted Cosine Similarity Measure for Text Classification, Intelligent Data Engineering and Automated Learning ? IDEAL, pp. 611?618, 2013. DOI: 10.1007/978-3-642-41278-3_74.

Egenhofer, M.J. & Frank, A.U., Object-Oriented Modeling in CIS: Inheritance and Propagation, pp. 588-598, 2008.

Dey, D., Storey, V.C. & Barron, T.M., Improving Database Design through the Analysis of Relationships, ACM Trans. Database Syst., 24(4), pp. 453?486, Dec. 1999. DOI: 10.1145/331983.331984.

Renguo, X., Dillon, T. S., Rahayu, W., Chang, E. & Gorla, N., An Indexing Structure For Aggregation Relationship In OODB, Database and Expert Systems Applications, 1873, pp. 21?30, 2000, DOI: 10.1007/3-540-44469-6_3

Han, J. & Fu, Y., Discovery of Multiple-Level Association Rules from Large Databases, 21st VLDB Conference, 1995.

Rutar, N., Almazan, C.B. & Foster, J.S., A Comparison of Bug Finding Tools for Java, 15th International Symposium on Software Reliability Engineering, pp. 245-256, 2004. DOI: 10.1109/ISSRE.2004.1.

Hovemeyer, D. & Pugh, W., Finding Bugs is Easy, Static Anal., 2004.

Aggarwal, K.K., Singh, Y. & Chhabra, J.K., An Integrated Measure of Software Maintainability, Annual Reliability and Maintainability Symposium. 2002 Proceedings (Cat. No.02CH37318), pp. 235?241, 2002. DOI: 10.1109/RAMS.2002.981648.

Java Code Smell | Java Code Analyzer, https://rules.sonarsource.com/java/type/Code%20Smell/ (Dec. 02, 2020).

Garc-Muz, J., Garc-Valls, M. & Escribano-Barreno, J., Improved Metrics Handling in SonarQube for Software Quality Monitoring, Advances in Intelligent Systems and Computing book series (AISC), 474, pp. 463-470, 2016. DOI: 10.1007/978-3-319-40162-1_50.

Aloysius, A. & Arockiam, L., Coupling Complexity Metric: A Cognitive Approach, Int. J. Inf. Technol. Comput. Sci., 4(9), pp. 29-35, Aug. 2012.

Downloads

Published

2022-12-31

How to Cite

Wijendra, D. R., & Hewagamage, K. P. (2022). Cognitive Complexity Applied to Software Development: An Automated Procedure to Reduce the Comprehension Effort. Journal of ICT Research and Applications, 16(3), 281-299. https://doi.org/10.5614/itbj.ict.res.appl.2022.16.3.6

Issue

Section

Articles