Reusing Code from StackOverflow: The Effect on Technical Debt

Georgios Digkas, Nikolaos Nikolaidis, Apostolos Ampatzoglou, A. Chatzigeorgiou
{"title":"Reusing Code from StackOverflow: The Effect on Technical Debt","authors":"Georgios Digkas, Nikolaos Nikolaidis, Apostolos Ampatzoglou, A. Chatzigeorgiou","doi":"10.1109/SEAA.2019.00022","DOIUrl":null,"url":null,"abstract":"Software reuse is a well-established software engineering process that aims at improving development productivity. Although reuse can be performed in a systematic way (e.g., through product lines), in practice, reuse is performed in many cases opportunistically, i.e., copying small code chunks either from the web or in-house developed projects. Knowledge sharing communities and especially StackOverflow constitute the primary source of code-related information for amateur and professional software developers. Despite the obvious benefit of increased productivity, reuse can have a mixed effect on the quality of the resulting code depending on the properties of the reused solutions. An efficient concept for capturing a wide-range of internal software qualities is the metaphor of Technical Debt which expresses the impact of shortcuts in software development on its maintenance costs. In this paper, we present the results of an empirical study on the relation between the existence of reusing code retrieved from StackOverflow on the technical debt of the target system. In particular, we study several open-source projects and identify non-trivial pieces of code that exhibit a perfect or near-perfect match with code provided in the context of answers in StackOverflow. Then, we compare the technical debt density of the reused fragments, obtained as the ratio of inefficiencies identified by SonarQube over the lines of reused code, to the technical debt density of the target codebase. The results provide insights to the potential impact of small-scale code reuse on technical debt and highlight the benefits of assessing code quality before committing changes to a repository.","PeriodicalId":272035,"journal":{"name":"2019 45th Euromicro Conference on Software Engineering and Advanced Applications (SEAA)","volume":"24 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2019-08-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"22","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"2019 45th Euromicro Conference on Software Engineering and Advanced Applications (SEAA)","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1109/SEAA.2019.00022","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 22

Abstract

Software reuse is a well-established software engineering process that aims at improving development productivity. Although reuse can be performed in a systematic way (e.g., through product lines), in practice, reuse is performed in many cases opportunistically, i.e., copying small code chunks either from the web or in-house developed projects. Knowledge sharing communities and especially StackOverflow constitute the primary source of code-related information for amateur and professional software developers. Despite the obvious benefit of increased productivity, reuse can have a mixed effect on the quality of the resulting code depending on the properties of the reused solutions. An efficient concept for capturing a wide-range of internal software qualities is the metaphor of Technical Debt which expresses the impact of shortcuts in software development on its maintenance costs. In this paper, we present the results of an empirical study on the relation between the existence of reusing code retrieved from StackOverflow on the technical debt of the target system. In particular, we study several open-source projects and identify non-trivial pieces of code that exhibit a perfect or near-perfect match with code provided in the context of answers in StackOverflow. Then, we compare the technical debt density of the reused fragments, obtained as the ratio of inefficiencies identified by SonarQube over the lines of reused code, to the technical debt density of the target codebase. The results provide insights to the potential impact of small-scale code reuse on technical debt and highlight the benefits of assessing code quality before committing changes to a repository.
查看原文
分享 分享
微信好友 朋友圈 QQ好友 复制链接
本刊更多论文
重用来自StackOverflow的代码:对技术债务的影响
软件重用是一个完善的软件工程过程,旨在提高开发效率。虽然重用可以以系统的方式执行(例如,通过产品线),但在实践中,重用在许多情况下是机会性地执行的,例如,从web或内部开发的项目中复制小代码块。知识共享社区,尤其是StackOverflow,为业余和专业软件开发人员提供了代码相关信息的主要来源。尽管提高生产力有明显的好处,但是根据被重用解决方案的属性,重用对结果代码的质量有不同的影响。捕获广泛的内部软件质量的一个有效概念是技术债务的隐喻,它表达了软件开发中的捷径对其维护成本的影响。在本文中,我们提出了一项实证研究的结果,研究了从StackOverflow检索的重用代码的存在与目标系统的技术债务之间的关系。特别是,我们研究了几个开源项目,并确定了与StackOverflow中答案上下文中提供的代码完美或近乎完美匹配的非平凡代码片段。然后,我们比较重用片段的技术债务密度,即SonarQube在重用代码行上识别的效率低下的比率,与目标代码库的技术债务密度。结果提供了小规模代码重用对技术债务的潜在影响的见解,并强调了在向存储库提交更改之前评估代码质量的好处。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 去求助
来源期刊
自引率
0.00%
发文量
0
期刊最新文献
An Evaluation Approach for Selecting Suitable Defect Prediction Method at Early Phases A Systematic Mapping Study of Value-Based Software Engineering Reusing Code from StackOverflow: The Effect on Technical Debt Exploratory Performance Testing Using Reinforcement Learning A Comparative Study of Vectorization Methods on BugLocator
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
现在去查看 取消
×
提示
确定
0
微信
客服QQ
Book学术公众号 扫码关注我们
反馈
×
意见反馈
请填写您的意见或建议
请填写您的手机或邮箱
已复制链接
已复制链接
快去分享给好友吧!
我知道了
×
扫码分享
扫码分享
Book学术官方微信
Book学术文献互助
Book学术文献互助群
群 号:481959085
Book学术
文献互助 智能选刊 最新文献 互助须知 联系我们:info@booksci.cn
Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。
Copyright © 2023 Book学术 All rights reserved.
ghs 京公网安备 11010802042870号 京ICP备2023020795号-1