Evidence map›Paper›PMID 36825214›Full record

ArticleFrontiers in neuroscience2022

On the accuracy of code complexity metrics: A neuroscience-based guideline for improvement.

Gao Hao, Haytham Hijazi, João Durães, Júlio Medeiros, Ricardo Couceiro, Chan Tong Lam, César Teixeira, João Castelhano, Miguel Castelo Branco, Paulo Carvalho and 1 more

Open access · goldAbstract read
In one paragraph

Article in Frontiers in neuroscience, 2022. The graph could read no effect estimate from its abstract, so it casts no vote on the map. Cited by 4 papers.

0numbers the graph read from it
0cells of the map it votes in
4citing papers in PubMed
8.7field-weighted citation impact, top 2% of its field
1 · What the graph read from it

What it found

Each row is one number read from the abstract, on the scale the paper reported it, with its interval. Left of the dashed line favours the treatment, right favours the comparator. Under each row is the sentence it came from. New to these charts? A ten-minute tutorial.

The abstract states no effect estimate the extractor could read, or names no intervention and outcome on the map, so this paper lights no cell and moves no belief. It is still indexed, cited and linked below.

2 · The registry

The trial behind it

Trials whose registry record cites this paper, or whose number appears in the abstract. A trial that started after this paper was published is citing it as background, not reporting it.

Neither the registry nor the abstract names a trial number. If this is a trial report, that itself is worth knowing.

3 · Its place in the literature

Who cites it

4 citing papers in PubMed, 19 citations in OpenAlex.

  1. Article
  2. Article
  3. Article
  4. Article
4 · The record

Corrections and comments

PubMed lists nothing against this paper. Absence here is not a guarantee, only a check that was made.

5 · Who and what money

Authors and funding

11 authors at 3 institutions in 2 countries.

Gao HaoFaculty of Applied Sciences, Macao Polytechnic University, Macao, Macao SAR, China.
Haytham HijaziCenter for Informatics and Systems of the University of Coimbra (CISUC), University of Coimbra, Coimbra, Portugal.
João DurãesCenter for Informatics and Systems of the University of Coimbra (CISUC), Polytechnic Institute of Coimbra, Coimbra, Portugal.
Júlio MedeirosCenter for Informatics and Systems of the University of Coimbra (CISUC), University of Coimbra, Coimbra, Portugal.
Ricardo CouceiroCenter for Informatics and Systems of the University of Coimbra (CISUC), University of Coimbra, Coimbra, Portugal.
Chan Tong LamFaculty of Applied Sciences, Macao Polytechnic University, Macao, Macao SAR, China.
César TeixeiraCenter for Informatics and Systems of the University of Coimbra (CISUC), University of Coimbra, Coimbra, Portugal.
João CastelhanoInstitute of Nuclear Science Applied to Health (ICNAS)/Coimbra Institute for Biomedical Imaging and Translational Research (CIBIT), University of Coimbra, Coimbra, Portugal.
Miguel Castelo BrancoInstitute of Nuclear Science Applied to Health (ICNAS)/Coimbra Institute for Biomedical Imaging and Translational Research (CIBIT), University of Coimbra, Coimbra, Portugal.
Paulo CarvalhoCenter for Informatics and Systems of the University of Coimbra (CISUC), University of Coimbra, Coimbra, Portugal.
Henrique MadeiraCenter for Informatics and Systems of the University of Coimbra (CISUC), University of Coimbra, Coimbra, Portugal.
University of Coimbra · PTMacao Polytechnic University · MOPolytechnic Institute of Coimbra · PT

Funding

No grant is acknowledged in the PubMed record.

6 · The paper itself

Abstract

Complexity is the key element of software quality. This article investigates the problem of measuring code complexity and discusses the results of a controlled experiment to compare different views and methods to measure code complexity. Participants (27 programmers) were asked to read and (try to) understand a set of programs, while the complexity of such programs is assessed through different methods and perspectives: (a) classic code complexity metrics such as McCabe and Halstead metrics, (b) cognitive complexity metrics based on scored code constructs, (c) cognitive complexity metrics from state-of-the-art tools such as SonarQube, (d) human-centered metrics relying on the direct assessment of programmers' behavioral features (e.g., reading time, and revisits) using eye tracking, and (e) cognitive load/mental effort assessed using electroencephalography (EEG). The human-centered perspective was complemented by the subjective evaluation of participants on the mental effort required to understand the programs using the NASA Task Load Index (TLX). Additionally, the evaluation of the code complexity is measured at both the program level and, whenever possible, at the very low level of code constructs/code regions, to identify the actual code elements and the code context that may trigger a complexity surge in the programmers' perception of code comprehension difficulty. The programmers' cognitive load measured using EEG was used as a reference to evaluate how the different metrics can express the (human) difficulty in comprehending the code. Extensive experimental results show that popular metrics such as V(g) and the complexity metric from SonarSource tools deviate considerably from the programmers' perception of code complexity and often do not show the expected monotonic behavior. The article summarizes the findings in a set of guidelines to improve existing code complexity metrics, particularly state-of-the-art metrics such as cognitive complexity from SonarSource tools.

Indexed as

code complexity metricscode comprehensioncode constructscode refactoringcognitive loadEEGmental effort

Identifiers

PMID36825214
PMCPMC9942489
OpenAlexW4319348873

What OpenQuestion holds

Textmetadata
LicenceCC BY
Read underepoch 390

Registered trials

None linked

Read under generation 80e0d062 · epoch 390. Bibliography from PubMed, PubMed Central and OpenAlex; grants from NIH RePORTER; trial links from ClinicalTrials.gov; estimates, votes and beliefs from the OpenQuestion graph.