一句话:复现并再分析2014年研究,揭示编程语言与缺陷的关联被严重高估,仅4种语言显著且效应极小。
针对Ray等人2014年声称11种编程语言与GitHub项目缺陷存在显著关联的研究,本文进行实验复现与独立再分析。复现因代码缺失和语言分类问题仅部分成功。作者随后重新检查原研究的数据与统计建模,发现多项严重方法缺陷,使与缺陷显著相关的语言从11种降至4种,且实际效应量极小。这些结果削弱了原研究结论,也说明许多后续工作所引用的“语言选择导致缺陷”的因果联系缺乏数据支持;即便修复方法缺陷,仍有过多未控制偏差,跨语言缺陷率比较难以可靠进行。
In a 2014 article, Ray, Posnett, Devanbu, and Filkov claimed to have uncovered a statistically significant association between 11 programming languages and software defects in 729 projects hosted on GitHub. Specifically, their work answered four research questions relating to software defects and programming languages. With data and code provided by the authors, the present article first attempts to conduct an experimental repetition of the original study. The repetition is only partially successful, due to missing code and issues with the classification of languages. The second part of this work focuses on their main claim, the association between bugs and languages, and performs a complete, independent reanalysis of the data and of the statistical modeling steps undertaken by Ray et al. in 2014. This reanalysis uncovers a number of serious flaws that reduce the number of languages with an association with defects down from 11 to only 4. Moreover, the practical effect size is exceedingly small. These results thus undermine the conclusions of the original study. Correcting the record is important, as many subsequent works have cited the 2014 article and have asserted, without evidence, a causal link between the choice of programming language for a given task and the number of software defects. Causation is not supported by the data at hand; and, in our opinion, even after fixing the methodological flaws we uncovered, too many unaccounted sources of bias remain to hope for a meaningful comparison of bug rates across languages.
@article{paperbot700,
title = {On the Impact of Programming Languages on Code Quality},
author = {Emery D. Berger and Celeste Hollenbeck and Petr Maj and Olga Vitek and Jan Vitek},
journal = {ACM Transactions on Programming Languages and Systems},
volume = {41},
number = {4},
year = {2019},
doi = {10.1145/3340571}
}