Skip to main page content
U.S. flag

An official website of the United States government

Dot gov

The .gov means it’s official.
Federal government websites often end in .gov or .mil. Before sharing sensitive information, make sure you’re on a federal government site.

Https

The site is secure.
The https:// ensures that you are connecting to the official website and that any information you provide is encrypted and transmitted securely.

Access keys NCBI Homepage MyNCBI Homepage Main Content Main Navigation
. 2024 Mar 7;19(3):e0299108.
doi: 10.1371/journal.pone.0299108. eCollection 2024.

EEG as a potential ground truth for the assessment of cognitive state in software development activities: A multimodal imaging study

Affiliations

EEG as a potential ground truth for the assessment of cognitive state in software development activities: A multimodal imaging study

Júlio Medeiros et al. PLoS One. .

Abstract

Cognitive human error and recent cognitive taxonomy on human error causes of software defects support the intuitive idea that, for instance, mental overload, attention slips, and working memory overload are important human causes for software bugs. In this paper, we approach the EEG as a reliable surrogate to MRI-based reference of the programmer's cognitive state to be used in situations where heavy imaging techniques are infeasible. The idea is to use EEG biomarkers to validate other less intrusive physiological measures, that can be easily recorded by wearable devices and useful in the assessment of the developer's cognitive state during software development tasks. Herein, our EEG study, with the support of fMRI, presents an extensive and systematic analysis by inspecting metrics and extracting relevant information about the most robust features, best EEG channels and the best hemodynamic time delay in the context of software development tasks. From the EEG-fMRI similarity analysis performed, we found significant correlations between a subset of EEG features and the Insula region of the brain, which has been reported as a region highly related to high cognitive tasks, such as software development tasks. We concluded that despite a clear inter-subject variability of the best EEG features and hemodynamic time delay used, the most robust and predominant EEG features, across all the subjects, are related to the Hjorth parameter Activity and Total Power features, from the EEG channels F4, FC4 and C4, and considering in most of the cases a hemodynamic time delay of 4 seconds used on the hemodynamic response function. These findings should be taken into account in future EEG-fMRI studies in the context of software debugging.

PubMed Disclaimer

Conflict of interest statement

The authors have declared that no competing interests exist.

Figures

Fig 1
Fig 1. Representative schematics of the acquisition protocol with an example of a run procedure.
The fixed cross is presented on the screen before and after the relevant conditions for analysis, i.e., the text reading condition, neutral code (code comprehension) condition and code inspection condition. The three main conditions order and code snippets examples are randomized in each run.
Fig 2
Fig 2. Representative schematics of the methodology adopted.
The three-stage methodology followed in this work: Preprocessing the EEG data (first block marked as green); Feature Engineering (second block marked as blue); and finally EEG—fMRI Similarity Analysis (third block marked as yellow).
Fig 3
Fig 3. Illustration of the occurrence of the top features obtained in the individual analysis.
Summary of the occurrence of the best 100 features and their corresponding statistical values (mean and corresponding maximum value from the overlap portion metric (d) and also from the absolute correlation values (r) of the significant voxels) from the individual analysis. In (A) is presented the occurrence regarding the feature type; in (B) regarding the EEG channels location; and in (C) the occurrence of the HRF delay used in each subject. In (A) and (B), each colour represents a different subject, and therefore there is a total of 14 different colours.
Fig 4
Fig 4. Illustration of the overlap between EEG-feature correlation map and Insula VOIs, for the individual analysis.
The overlap information presented is over the four different runs from one subject, considering one example of a top selected feature obtained in the individual analysis of the subject (Total Power from the EEG channel FC6). The mean of the absolute correlation values (r) and the overlap portion metric value (d) are also presented for each example. The brain illustrations were generated using the NeuroElf Toolbox v1.1 (developed by Jochen Weber at Columbia University).
Fig 5
Fig 5. Illustration of the occurrence of the top features obtained in the group analysis.
Summary of the occurrence of the best 200 features and corresponding metric values (mean and corresponding maximum value from the overlap portion metric (d) and also from the absolute correlation values (r) of the significant voxels) from the group analysis. In (A) is presented the occurrence regarding the feature type; in (B) regarding the EEG channels location; and in (C) the occurrence of the HRF delay used in each subject.
Fig 6
Fig 6. Illustration of the overlap between EEG-feature correlation map and Insula VOIs, for the group analysis.
The overlap information presented is over the four different runs and considering different subjects, for one example of one of the robust features obtained in the group analysis (Activity from the EEG channel FC4). The mean of the absolute correlation values (r) and the overlap portion metric value (d) are also presented for each example. The brain illustrations were generated using the NeuroElf Toolbox v1.1 (developed by Jochen Weber at Columbia University).

References

    1. McConnell SC. Code Complete: A Practical Handbook of Software Construction. Microsoft Press; 2004.
    1. Shah SMA, Morisio M, Torchiano M. The impact of process maturity on defect density. In: Proceedings of the 2012 ACM-IEEE International Symposium on Empirical Software Engineering and Measurement. IEEE; 2012. p. 315–318.
    1. Boehm B, Port D, Jain A, Basili V. Achieving CMMI Level 5 improvements with MBASE and the CeBASE method. CrossTalk. 2002;15(5):9–16.
    1. Honda N, Yamada S. Empirical Analysis for High Quality SW Development. Ameri Jour Op Research. 2012. doi: 10.4236/ajor.2012.21004 - DOI
    1. Zhang H. An investigation of the relationships between lines of code and defects. In: 2009 IEEE International Conference on Software Maintenance. IEEE; 2009. p. 274–283.