Defects, or bugs, often form during software development. Identifying the root cause of defects is essential to improve code quality, evaluate testing methods, and support defect prediction. Examples of defect-inducing changes can be found using the SZZ algorithm to trace the textual history of defect-fixing changes back to the defect-inducing changes that they fix in line-based code. The line-based approach of the SZZ method is ineffective for visual code that represents source code graphically rather than textually. In this paper we adapt SZZ for visual code and present the "SZZ Visual Code" (SZZ-VC) algorithm, that finds changes in visual code based on the differences of graphical elements rather than differences of lines to detect defect-inducing changes. We validated the algorithm for an industry-made AAA video game and 20 music visual programming defects across 12 open source projects. Our results show that SZZ-VC is feasible for detecting defects in visual code for 3 different visual programming languages.
翻译:缺陷(或错误)常在软件开发过程中形成。识别缺陷的根本原因对于提升代码质量、评估测试方法以及支持缺陷预测至关重要。可通过SZZ算法追溯缺陷修复变更的文本历史,定位其修复的基于行代码中的缺陷引入变更。然而,对于以图形方式而非文本方式表示源代码的视觉代码而言,SZZ算法的基于行的方法效率低下。本文针对视觉代码调整SZZ算法,提出"SZZ视觉代码"(SZZ-VC)算法,该算法基于图形元素差异而非行差异来检测视觉代码中的变更,从而识别缺陷引入变更。我们基于一款行业级AAA视频游戏及12个开源项目中的20个音乐视觉编程缺陷对该算法进行了验证。结果表明,SZZ-VC在3种不同视觉编程语言中检测视觉代码缺陷方面具有可行性。