一句话:通过三个学期的课堂实验,评估 PMD 静态分析工具在代码审查教学中提升学生软件质量意识的效果。
静态分析工具常被引入课堂,用于帮助学生识别代码反模式,但由于这类 linter 往往产生大量误报,其教学效果尚不明确。本文报告了一项持续 3 个学期、涵盖 65 份提交、使用 PMD 对 690 条规则进行代码审查的课堂实验。作者对实验数据进行定量与定性分析,结果表明:某一组 PMD 质量问题的存在会影响学生对问题的接受或拒绝;与设计和最佳实践相关的类别需要更长时间才能被解决;学生也认可静态分析工具在代码审查中的潜力。作者认为代码审查可以成为计算教育计划的重要组成部分,并期望这些发现能帮助教育者借助代码审查策略提高学生对静态分析工具的认知、促进其编程技能发展。
Static analysis tools are frequently used to scan the source code and detect deviations from the project coding guidelines. Given their importance, linters are often introduced to classrooms to educate students on how to detect and potentially avoid these code anti-patterns. However, little is known about their effectiveness in raising students’ awareness, given that these linters tend to generate a large number of false positives. To increase the awareness of potential coding issues that violate coding standards, in this paper, we aim to reflect on our experience with teaching the use of static analysis for the purpose of evaluating its effectiveness in helping students with respect to improving software quality. This paper discusses the results of an experiment in the classroom, over a period of 3 academic semesters, involving 65 submissions that carried out code review activity of 690 rules using PMD. The results of the quantitative and qualitative analysis show that the presence of a set of PMD quality issues influences the acceptance or rejection of the issues, design, and best practices-related categories that take longer time to be resolved, and students acknowledge the potential of using static analysis tools during code review. Through this experiment, code review can turn into a vital part of the educational computing plan. We envision our findings enabling educators to support students with code review strategies in order to raise students’ awareness about static analysis tools and scaffold their coding skills.
DOI 原文 · arXiv · PDF(开放获取) · DBLP
@inproceedings{abs-2302-05554,
title = {On the use of static analysis to engage students with software quality improvement: An experience with PMD},
author = {Eman Abdullah AlOmar and Salma Abdullah AlOmar and Mohamed Wiem Mkaouer},
booktitle = {ICSE},
year = {2023},
doi = {10.1109/icse-seet58685.2023.00023}
}