Path Complexity Correlates with Source Code Comprehension Effort Indicators

Sofiane Dissem, Eli Pregerson, Adi Bhargava, Josh Cordova, Lucas Bang
{"title":"Path Complexity Correlates with Source Code Comprehension Effort Indicators","authors":"Sofiane Dissem, Eli Pregerson, Adi Bhargava, Josh Cordova, Lucas Bang","doi":"10.1109/ICPC58990.2023.00041","DOIUrl":null,"url":null,"abstract":"We describe our work on the relationship between the asymptotic path complexity of a program, time-to-completion, subjective complexity, correctness performance, and levels of brain (de)activation in select Brodmann areas of the brain, as measured by fMRI, while a human subject attempts to understand the source code of a program. Asymptotic path complexity gives an asymptotic upper bound on how quickly the number of paths through a program grows with increasing execution depth. (De)activation levels in the studied Brodmann areas of the brain are known to correlate with different specific types of cognitive effort. We add the asymptotic path complexity metric to an existing fMRI-code-comprehension data set that compares common code metrics to cognitive effort. Our results show that, according to Kendall rank correlation, asymptotic path complexity has (1) better correlation than all other metrics with code comprehension task completion time, (2) better correlation than all other metrics with subjective participant complexity, (3) better correlation than all other metrics for brain areas responsible for semantic processing, (4) correlations comparable to lines of code and Halstead complexity, and better correlation than (McCabe’s) cyclomatic complexity and dependency degree for participant response correctness and for (de)activation levels in brain areas responsible for rational thought and extracting signal from noise, and, finally, (5) worse correlation than all metrics (except McCabe’s cyclomatic complexity) for brain areas responsible for motion plandisse, language and audio processing, and additional forms of semantic processing. Overall, our results indicate that path complexity is a useful metric for measuring many aspects of code comprehension effort.","PeriodicalId":376593,"journal":{"name":"2023 IEEE/ACM 31st International Conference on Program Comprehension (ICPC)","volume":"77 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2023-05-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"2023 IEEE/ACM 31st International Conference on Program Comprehension (ICPC)","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1109/ICPC58990.2023.00041","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 0

Abstract

We describe our work on the relationship between the asymptotic path complexity of a program, time-to-completion, subjective complexity, correctness performance, and levels of brain (de)activation in select Brodmann areas of the brain, as measured by fMRI, while a human subject attempts to understand the source code of a program. Asymptotic path complexity gives an asymptotic upper bound on how quickly the number of paths through a program grows with increasing execution depth. (De)activation levels in the studied Brodmann areas of the brain are known to correlate with different specific types of cognitive effort. We add the asymptotic path complexity metric to an existing fMRI-code-comprehension data set that compares common code metrics to cognitive effort. Our results show that, according to Kendall rank correlation, asymptotic path complexity has (1) better correlation than all other metrics with code comprehension task completion time, (2) better correlation than all other metrics with subjective participant complexity, (3) better correlation than all other metrics for brain areas responsible for semantic processing, (4) correlations comparable to lines of code and Halstead complexity, and better correlation than (McCabe’s) cyclomatic complexity and dependency degree for participant response correctness and for (de)activation levels in brain areas responsible for rational thought and extracting signal from noise, and, finally, (5) worse correlation than all metrics (except McCabe’s cyclomatic complexity) for brain areas responsible for motion plandisse, language and audio processing, and additional forms of semantic processing. Overall, our results indicate that path complexity is a useful metric for measuring many aspects of code comprehension effort.
路径复杂性与源代码理解努力指标相关
我们描述了我们在程序的渐近路径复杂性、完成时间、主观复杂性、正确性性能和大脑(de)激活水平之间的关系,通过fMRI测量,当人类受试者试图理解程序的源代码时。渐近路径复杂度给出了随着执行深度的增加,程序中路径数量增长速度的渐近上界。已知在研究的大脑的Brodmann区域的激活水平与不同类型的认知努力相关。我们将渐近路径复杂性度量添加到现有的fmri代码理解数据集,该数据集将常见代码度量与认知努力进行比较。我们的研究结果表明,根据肯德尔秩相关,渐近路径复杂度(1)与代码理解任务完成时间的相关性优于所有其他指标,(2)与主观参与者复杂性的相关性优于所有其他指标,(3)与负责语义处理的大脑区域的相关性优于所有其他指标,(4)与代码行数和Halstead复杂性的相关性相当。参与者反应正确性和负责理性思维和从噪声中提取信号的脑区(去激活)水平的相关性优于(McCabe的)圈复杂度和依赖程度,最后,(5)与负责运动平面、语言和音频处理以及其他形式的语义处理的脑区(McCabe的圈复杂度除外)的相关性低于所有指标。总的来说,我们的结果表明,路径复杂性是衡量代码理解工作的许多方面的有用度量。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 求助全文
来源期刊
自引率
0.00%
发文量
0
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
copy
已复制链接
快去分享给好友吧!
我知道了
右上角分享
点击右上角分享
0
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:481959085
Book学术官方微信