Bachelorarbeit BCLR-2019-72

Munoz Baron, Marvin: A Validation of Cognitive Complexity as a Measure of Source Code Understandability.
Universität Stuttgart, Fakultät Informatik, Elektrotechnik und Informationstechnik, Bachelorarbeit Nr. 72 (2019).
60 Seiten, englisch.

Understanding source code is an integral part of the software development process. There have been numerous attempts to describe source code metrics that correlate with understandability, but few are empirically evaluated and those that are, show no meaningful support for their purpose. A recent effort is cognitive complexity, a measure specifically described as a metric for understandability. The primary goal of this study was to find evidence towards determining the validity of cognitive complexity as a measure of source code understandability. To achieve this, we planned and executed a systematic literature search to find source code snippets that were evaluated in terms of understandability in previous studies. The cognitive complexity of these snippets was then correlated with the measures of understandability used in the studies. The literature search identified data from 14 studies spanning over 324 code snippets and approximately 24,400 individual human evaluations, which were used in the correlation analysis. The results show that for most of the measures from existing studies, cognitive complexity significantly correlates with source code understandability. The mean of the significant correlations was 0.654 for comprehension time and 0.411 for subjective ratings of understandability, readability, and confidence by the study participants. The correlation with the correctness of the comprehension tasks showed mixed results, with some significant positive and some significant negative correlations. Overall, the evidence gathered in this study shows significant support for the validity of cognitive complexity. As far as we know, cognitive complexity is the first solely code-based metric that correlates with source code understandability in a meaningful way.

Volltext und
andere Links
Abteilung(en)Universität Stuttgart, Institut für Softwaretechnologie, Software Engineering
BetreuerWagner, Prof. Stefan; Wyrich, Marvin
Eingabedatum21. Januar 2020
   Publ. Informatik