Skip to Main Content (Press Enter)

Logo UNINSUBRIA
  • ×
  • Home
  • Corsi
  • Insegnamenti
  • Professioni
  • Persone
  • Pubblicazioni
  • Strutture
  • Terza Missione
  • Attività
  • Competenze

UNI-FIND
Logo UNINSUBRIA

|

UNI-FIND

uninsubria.it
  • ×
  • Home
  • Corsi
  • Insegnamenti
  • Professioni
  • Persone
  • Pubblicazioni
  • Strutture
  • Terza Missione
  • Attività
  • Competenze
  1. Pubblicazioni

An empirical evaluation of the “cognitive complexity” measure as a predictor of code understandability

Articolo
Data di Pubblicazione:
2023
Abstract:
Background: Code that is difficult to understand is also difficult to inspect and maintain and ultimately causes increased costs. Therefore, it would be greatly beneficial to have source code measures that are related to code understandability. Many ‘‘traditional’’ source code measures, including for instance Lines of Code and McCabe’s Cyclomatic Complexity, have been used to identify hard-to-understand code. In addition, the ‘‘Cognitive Complexity’’ measure was introduced in 2018 with the specific goal of improving the ability to evaluate code understandability.
Aims: The goals of this paper are to assess whether (1) ‘‘Cognitive Complexity’’ is better correlated with code understandability than traditional measures, and (2) the availability of the ‘‘Cognitive Complexity’’ measure improves the performance (i.e., the accuracy) of code understandability prediction models.
Method: We carried out an empirical study, in which we reused code understandability measures used in several previous studies. We first built Support Vector Regression models of understandability vs. code measures, and we then compared the performance of models that use ‘‘Cognitive Complexity’’ against the performance of models that do not.
Results: ‘‘Cognitive Complexity’’ appears to be correlated to code understandability approximately as much as traditional measures, and the performance of models that use ‘‘Cognitive Complexity’’ is extremely close to the performance of models that use only traditional measures.
Conclusions: The ‘‘Cognitive Complexity’’ measure does not appear to fulfill the promise of being a significant improvement over previously proposed measures, as far as code understandability prediction is concerned.
Tipologia CRIS:
Articolo su Rivista
Keywords:
Software understandability, Cognitive complexity, Software code measures, Complexity measures, Static code measures
Elenco autori:
Lavazza, Luigi; Abualkishik, Abedallah Zaid; Liu, Geng; Morasca, Sandro
Autori di Ateneo:
Ingegneria del Software Empirica
LAVAZZA LUIGI ANTONIO
MORASCA SANDRO
Link alla scheda completa:
https://irinsubria.uninsubria.it/handle/11383/2144151
Pubblicato in:
THE JOURNAL OF SYSTEMS AND SOFTWARE
Journal
  • Accessibilità
  • Utilizzo dei cookie

Realizzato con VIVO | Designed by Cineca | 26.9.2.0