• 综合
  • 标题
  • 关键词
  • 摘要
  • 学者
  • 期刊-刊名
  • 期刊-ISSN
  • 会议名称
搜索

作者:

Mi, Qing (Mi, Qing.) | Bai, Haotian (Bai, Haotian.) | Wang, Xiaozhou (Wang, Xiaozhou.) | Liu, Wenrui (Liu, Wenrui.) | Song, Xingyue (Song, Xingyue.)

收录:

EI Scopus

摘要:

Stack Overflow (SO) is one of the world’s largest technical Q&A websites, in which many posts contain code snippets. However, these code snippets may not comply with coding style guidelines and result in the problem of low readability and maintainability. To provide a better understanding of this coding style compliance issue for SO users, we plan and conduct an empirical study on SO. Specifically, we collected over 400,000 code snippets from SO in three languages, namely Python, C/C++, and JavaScript. The posts are divided into two types (i.e., question and answer) and analyzed separately. We found that for the question- and answer-type posts, more than 90% and 60% of code snippets contain style violations. The most frequently found violation is syntax errors for Python and indentations for C/C++ and JavaScript. In addition, the results show that with more violations in code snippets, the 'Score' of Python and C/C++ posts, the 'FavoriteCount' of C/C++ questions, and the 'CommentCount' of JavaScript questions tend to be lower. The findings of our research indicate that code snippets on SO do not have good coding style compliance. Users, especially programming beginners are supposed to be wary of the potential problems of reusing code snippets on SO. © 2023 Knowledge Systems Institute Graduate School. All rights reserved.

关键词:

Software engineering C++ (programming language) Python Knowledge engineering

作者机构:

  • [ 1 ] [Mi, Qing]Faculty of Information Technology, Beijing University of Technology, Beijing, China
  • [ 2 ] [Bai, Haotian]Faculty of Information Technology, Beijing University of Technology, Beijing, China
  • [ 3 ] [Wang, Xiaozhou]Faculty of Information Technology, Beijing University of Technology, Beijing, China
  • [ 4 ] [Liu, Wenrui]Faculty of Information Technology, Beijing University of Technology, Beijing, China
  • [ 5 ] [Song, Xingyue]Faculty of Information Technology, Beijing University of Technology, Beijing, China

通讯作者信息:

电子邮件地址:

查看成果更多字段

相关关键词:

相关文章:

来源 :

ISSN: 2325-9000

年份: 2023

卷: 2023-July

页码: 130-135

语种: 英文

被引次数:

WoS核心集被引频次:

SCOPUS被引频次:

ESI高被引论文在榜: 0 展开所有

万方被引频次:

中文被引频次:

近30日浏览量: 0

归属院系:

在线人数/总访问数:551/4980843
地址:北京工业大学图书馆(北京市朝阳区平乐园100号 邮编:100124) 联系我们:010-67392185
版权所有:北京工业大学图书馆 站点建设与维护:北京爱琴海乐之技术有限公司