[论文解读] Initial and Eventual Software Quality Relating to Continuous Integration in GitHub
本研究分析了大型开源项目中GitHub拉取请求(pull requests)的持续集成(CI)失败模式,利用Travis-CI日志评估初始质量(IQ R),并通过合并后的缺陷修复来衡量最终质量(EQ R)。研究发现,CI失败集中在少数文件中,与最终缺陷的相关性较弱,且存在CI失败的拉取请求在后期出现缺陷的概率高出31.5%,表明CI本身并不能保证高质量代码。
The constant demand for new features and bug fixes are forcing software projects to shorten cycles and deliver updates ever faster, while sustaining software quality. The availability of inexpensive, virtualized, cloud-computing has helped shorten schedules, by enabling continuous integration (CI) on demand. Platforms like GitHub support CI in-the-cloud. In projects using CI, a user submitting a pull request triggers a CI step. Besides speeding up build and test, this fortuitously creates voluminous archives of build and test successes and failures. CI is a relatively new phenomenon, and these archives allow a detailed study of CI. How many problems are exposed? Where do they occur? What factors affect CI failures? Does the "initial quality" as ascertained by CI predict how many bugs will later appear ("eventual quality") in the code? In this paper, we undertake a large-scale, fine resolution study of these records, to better understand CI processes, the nature, and predictors of CI failures, and the relationship of CI failures to the eventual quality of the code. We find that: a) CI failures appear to be concentrated in a few files, just like normal bugs; b) CI failures are not very highly correlated with eventual failures; c) The use of CI in a pull request doesn't necessarily mean the code in that request is of good quality.
研究动机与目标
- 理解GitHub拉取请求中CI失败的分布特征及其预测因素。
- 调查通过CI失败衡量的初始质量是否能预测合并后的最终软件质量。
- 识别影响CI失败率和最终缺陷发生率的过程、产品及社会因素。
- 通过比较预合并失败与合并后缺陷修复,评估CI作为质量门禁的有效性。
- 评估文件中历史缺陷模式是否影响CI失败和最终质量结果。
提出的方法
- 从大型GitHub项目中拉取请求的Travis-CI日志中提取初始质量记录(IQ R)。
- 通过版本控制历史和提交分析识别合并后的缺陷修复,构建最终质量记录(EQ R)。
- 在文件和拉取请求层面聚合数据,重点关注合并后六个月内发生的CI失败和后续缺陷修复。
- 应用统计建模评估IQ R、EQ R与文件修改频率、历史缺陷密度等各类预测因子之间的相关性。
- 使用逻辑回归基于初始CI失败指标和历史缺陷数据,估算最终质量失败的几率比。
- 将分析限制在具有活跃问题追踪器的项目中,并排除无CI日志的PR,以确保数据质量和一致性。
实验结果
研究问题
- RQ1CI失败是否广泛分布在多个文件中,还是集中在少数文件中,类似于传统软件缺陷的分布模式?
- RQ2拉取请求中存在CI失败在多大程度上能预测未来合并后缺陷的可能性?
- RQ3文件修改频率、历史缺陷密度和PR大小等因素如何影响CI失败率?
- RQ4在文件或PR层面,初始质量(CI失败)与最终质量(合并后缺陷)之间是否存在有意义的关系?
- RQ5文件中非CI缺陷的历史是否会影响后续CI失败或最终质量问题的发生概率?
主要发现
- CI失败高度集中在少数文件中,其分布模式与传统软件缺陷相似。
- 修改过历史CI失败文件的拉取请求,未来更可能遭遇CI失败。
- 出人意料的是,修改频率更高的文件CI失败更少,表明高修改频率的文件在CI中可能更稳定。
- 初始质量记录较差(CI失败更多)的PR并不一定导致更高的最终质量问题,表明IQ R与EQ R之间相关性较弱。
- 尽管整体相关性较弱,但存在CI失败的PR在合并后与最终质量问题相关的几率高出31.5%。
- 具有非CI缺陷历史的文件,即使控制CI失败历史,其未来EQ R失败的几率也更高,每单位历史非CI缺陷增加,风险上升27.3%。
更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。