首页> 外文期刊>IEEE Transactions on Software Engineering >Toxic Code Snippets on Stack Overflow
【24h】

Toxic Code Snippets on Stack Overflow

机译:堆栈溢出的有毒代码片段

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

摘要

Online code clones are code fragments that are copied from software projects or online sources to Stack Overflow as examples. Due to an absence of a checking mechanism after the code has been copied to Stack Overflow, they can become toxic code snippets, e.g., they suffer from being outdated or violating the original software license. We present a study of online code clones on Stack Overflow and their toxicity by incorporating two developer surveys and a large-scale code clone detection. A survey of 201 high-reputation Stack Overflow answerers (33 percent response rate) showed that 131 participants (65 percent) have ever been notified of outdated code and 26 of them (20 percent) rarely or never fix the code. 138 answerers (69 percent) never check for licensing conflicts between their copied code snippets and Stack Overflow's CC BY-SA 3.0. A survey of 87 Stack Overflow visitors shows that they experienced several issues from Stack Overflow answers: mismatched solutions, outdated solutions, incorrect solutions, and buggy code. 85 percent of them are not aware of CC BY-SA 3.0 license enforced by Stack Overflow, and 66 percent never check for license conflicts when reusing code snippets. Our clone detection found online clone pairs between 72,365 Java code snippets on Stack Overflow and 111 open source projects in the curated Qualitas corpus. We analysed 2,289 non-trivial online clone candidates. Our investigation revealed strong evidence that 153 clones have been copied from a Qualitas project to Stack Overflow. We found 100 of them (66 percent) to be outdated, of which 10 were buggy and harmful for reuse. Furthermore, we found 214 code snippets that could potentially violate the license of their original software and appear 7,112 times in 2,427 GitHub projects.
机译:在线代码克隆是从软件项目或在线源复制到堆栈溢出作为示例的代码片段。由于代码被复制到堆栈溢出之后,因此可以成为有毒码片段,例如,它们可能会过时或违反原始软件许可证。我们通过结合两个开发人员调查和大规模代码克隆检测,展示了对堆栈溢出的在线克隆及其毒性的研究。对201次高声誉堆栈溢出应答者的调查(33%的响应率)显示,已有131名参与者(65%)已被通知过时的代码,其中26个(20%)很少或永不修复代码。 138个回答者(69%)切勿检查其复制的代码片段和堆栈溢出的CC BY-SA 3.0之间的许可冲突。对87个堆栈溢出访客的调查显示,它们经历了堆栈溢出答案的几个问题:不匹配的解决方案,过时的解决方案,解决方案和错误代码。其中85%的人不知道堆栈溢出强制执行的CC By-SA 3.0许可证,66%的人从不检查重用代码片段时的许可冲突。我们的克隆检测在堆栈溢出的72,365个Java代码片段和111个开源项目中找到了在线克隆对在策划的Qualitas语料库中。我们分析了2,289个非琐碎的在线克隆候选人。我们的调查揭示了强有力的证据,即153个克隆从质优项目复制到堆叠溢出。我们发现了100个(66%)过时,其中10个是错误和有害的重用。此外,我们发现了214个代码片段,可能会违反其原始软件的许可,并在2,427个GitHub项目中出现7,112次。

著录项

相似文献

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

客服邮箱:kefu@zhangqiaokeyan.com

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

  • 服务号