On code reuse from StackOverflow: An exploratory study on Android apps

被引:72
作者
Abdalkareem, Rabe [1 ]
Shihab, Emad [1 ]
Rilling, Juergen [2 ]
机构
[1] Concordia Univ, Data Driven Anal Software DAS Lab, Montreal, PQ, Canada
[2] Concordia Univ, Dept Comp Sci & Software Engn, Montreal, PQ, Canada
关键词
StackOverflow; Mobile app; Code reuse; SOFTWARE CHANGES;
D O I
10.1016/j.infsof.2017.04.005
中图分类号
TP [自动化技术、计算机技术];
学科分类号
0812 ;
摘要
Context: Source code reuse has been widely accepted as a fundamental activity in software development. Recent studies showed that StackOverflow has emerged as one of the most popular resources for code reuse. Therefore, a plethora of work proposed ways to optimally ask questions, search for answers and find relevant code on StackOverflow. However, little work studies the impact of code reuse from Stack Overflow. Objective: To better understand the impact of code reuse from StackOverflow, we perform an exploratory study focusing on code reuse from StackOverflow in the context of mobile apps. Specifically, we investigate how much, why, when, and who reuses code. Moreover, to understand the potential implications of code reuse, we examine the percentage of bugs in files that reuse StackOverflow code. Method: We perform our study on 22 open source Android apps. For each project, we mine their source code and use clone detection techniques to identify code that is reused from StackOverflow. We then apply different quantitative and qualitative methods to answer our research questions. Results: Our findings indicate that 1) the amount of reused StackOverflow code varies for different mobile apps, 2) feature additions and enhancements in apps are the main reasons for code reuse from StackOverflow, 3) mid-age and older apps reuse StackOverflow code mostly later on in their project lifetime and 4) that in smaller teams/apps, more experienced developers reuse code, whereas in larger teams/apps, the less experienced developers reuse code the most. Additionally, we found that the percentage of bugs is higher in files after reusing code from StackOverflow. Conclusion: Our results provide insights on the potential impact of code reuse from StackOverflow on mobile apps. Furthermore, these results can benefit the research community in developing new techniques and tools to facilitate and improve code reuse from StackOverflow. (C) 2017 Elsevier B.V. All rights reserved.
引用
收藏
页码:148 / 158
页数:11
相关论文
共 35 条
[1]   What Do Developers Use the Crowd For? A Study Using Stack Overflow [J].
Abdalkareem, Rabe ;
Shihab, Emad ;
Rilling, Juergen .
IEEE SOFTWARE, 2017, 34 (02) :53-60
[2]  
[Anonymous], 2007, 541 QUEENS U KINGST
[3]  
Barua A., 2012, J ESME 12, V19, P619
[4]   Understanding reuse of software examples: A case study of prejudice in a community of practice [J].
Barzilay, Ohad ;
Urquhart, Cathy .
INFORMATION AND SOFTWARE TECHNOLOGY, 2014, 56 (12) :1613-1628
[5]  
Bernal-Cardenas C., 2013, ESEC/ FSE 477-487, P477, DOI [DOI 10.1145/2491411.2491428, 10.1145/2491411.2491428]
[6]  
Bird C., 2011, 19 ACM SIGSOFT S 13, P4, DOI DOI 10.1145/2025113.2025119
[7]   Achieving Accuracy and Scalability Simultaneously in Detecting Application Clones on Android Markets [J].
Chen, Kai ;
Liu, Peng ;
Zhang, Yingjun .
36TH INTERNATIONAL CONFERENCE ON SOFTWARE ENGINEERING (ICSE 2014), 2014, :175-186
[8]   A COEFFICIENT OF AGREEMENT FOR NOMINAL SCALES [J].
COHEN, J .
EDUCATIONAL AND PSYCHOLOGICAL MEASUREMENT, 1960, 20 (01) :37-46
[9]  
Cordeiro J., 2012, 2012 Third International Workshop on Recommendation Systems for Software Engineering (RSSE), P85, DOI 10.1109/RSSE.2012.6233418
[10]  
Davies Julius, 2011, P 8 WORK C MIN SOFTW, P183, DOI [10.1145/1985441.1985468, DOI 10.1145/1985441.1985468]