首页> 外文期刊>Software >Using Stack Overflow content to assist in code review
【24h】

Using Stack Overflow content to assist in code review

机译:使用堆栈溢出内容来协助代码审查

获取原文
获取原文并翻译 | 示例
       

摘要

An essential goal for programmers is to minimize the cost of identifying and correcting defects in source code. Code review is commonly used for identifying programming defects. However, manual code review has some shortcomings: (1) it is time-consuming and (2) outcomes are subjective and depend on the skills of reviewers. An automated approach for assisting in code reviews is thus highly desirable. We present a tool for assisting in code review and results from our experiments evaluating the tool in different scenarios. The tool leveraged content available from professional programmer support forums (eg, StackOverflow.com) to determine potential defectiveness of a given piece of source code. The defectiveness is expressed on the scale of {Likely defective, neutral, unlikely to be defective}. The basic idea employed in the tool is (1) to identify a set P of discussion posts on Stack Overflow such that each p is an element of P contains source code fragment(s), which sufficiently resemble the input code C being reviewed, and (2) to determine the likelihood of C being defective by considering all p is an element of P. A novel aspect of our approach is to use document fingerprinting for comparing two pieces of source code. Our choice of document fingerprinting technique is inspired by source code plagiarism detection tools where it has proven to be very successful. In the experiments that we performed to verify the effectiveness of our approach, source code samples from more than 300 GitHub open-source repositories were taken as input. An F1 score of 0.94 has been achieved in identifying correct/relevant results.
机译:程序员的基本目标是最大程度地减少识别和纠正源代码中的缺陷的成本。代码审查通常用于识别编程缺陷。但是,手动代码审查有一些缺点:(1)这很耗时,并且(2)结果是主观的,并且取决于审查者的技能。因此,非常需要一种自动进行代码审查的方法。我们提供了一种工具,用于协助代码审查以及我们在不同情况下评估该工具的实验结果。该工具利用了专业程序员支持论坛(例如,StackOverflow.com)上可用的内容来确定给定源代码的潜在缺陷。缺陷的表示程度为{有缺陷,中立,不太可能缺陷}。该工具采用的基本思想是:(1)在Stack Overflow上标识一组讨论帖子,以使每个p是P的元素,其中包含源代码片段,该源代码片段与正在检查的输入代码C十分相似,并且(2)通过考虑所有p来确定C出现缺陷的可能性是P的元素。我们方法的一个新颖方面是使用文档指纹比较两个源代码。我们选择的文档指纹识别技术是受到源代码窃检测工具的启发,事实证明它非常成功。在我们为验证我们方法的有效性而进行的实验中,来自300多个GitHub开源存储库的源代码样本被用作输入。识别正确/相关结果时,F1得分为0.94。

著录项

相似文献

  • 外文文献
  • 中文文献
  • 专利
获取原文

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号