Reusing Code from StackOverflow: The Effect on Technical Debt

被引:22
作者
Nikolaidis, Nikolaos [1 ]
Digkas, Georgios [1 ]
Ampatzoglou, Apostolos [1 ]
Chatzigeorgiou, Alexander [1 ]
机构
[1] Univ Macedonia, Dept Appl Informat, Thessaloniki, Greece
来源
2019 45TH EUROMICRO CONFERENCE ON SOFTWARE ENGINEERING AND ADVANCED APPLICATIONS (SEAA 2019) | 2019年
关键词
Technical Debt; StackOverflow; Code Reuse; Software Quality;
D O I
10.1109/SEAA.2019.00022
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
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.
引用
收藏
页码:87 / 91
页数:5
相关论文
共 18 条
[1]   On code reuse from StackOverflow: An exploratory study on Android apps [J].
Abdalkareem, Rabe ;
Shihab, Emad ;
Rilling, Juergen .
INFORMATION AND SOFTWARE TECHNOLOGY, 2017, 88 :148-158
[2]  
[Anonymous], 2012, CASE STUDY RES SOFTW, DOI DOI 10.1002/9781118181034
[3]  
Baltes S., 2018, EMPIRICAL SOFTWARE E
[4]   Attribution Required: Stack Overflow Code Snippets in GitHub Projects [J].
Baltes, Sebastian ;
Kiefer, Richard ;
Diehl, Stephan .
PROCEEDINGS OF THE 2017 IEEE/ACM 39TH INTERNATIONAL CONFERENCE ON SOFTWARE ENGINEERING COMPANION (ICSE-C 2017), 2017, :161-163
[5]  
Brown M, 2010, SMART SCIENCE FOR EXPLORATION AND MINING, VOL 1 AND 2, P47
[6]   Quantifying reuse in OSS: A large-scale empirical study [J].
Constantinou, Eleni ;
Ampatzoglou, Apostolos ;
Stamelos, Ioannis .
International Journal of Open Source Software and Processes, 2014, 5 (03) :1-19
[7]   Quality improvement using a software reuse failure modes model [J].
Frakes, WB ;
Fox, CJ .
IEEE TRANSACTIONS ON SOFTWARE ENGINEERING, 1996, 22 (04) :274-279
[8]  
Gaffney J. E. Jr., 1992, International Conference on Software Engineering, P327, DOI 10.1109/ICSE.1992.753510
[9]   Code reuse in open source software [J].
Haefliger, Stefan ;
von Krogh, Georg ;
Spaeth, Sebastian .
MANAGEMENT SCIENCE, 2008, 54 (01) :180-193
[10]  
Li JY, 2007, P INT COMP SOFTW APP, P399