Why reinventing the wheels? An empirical study on library reuse and re-implementation

Nowadays, with the rapid growth of open source software (OSS), library reuse becomes more and more popular since a large amount of third- party libraries are available to download and reuse. A deeper understanding on why developers reuse a library (i.e., replacing self-implemented code with an exter...

Full description

Saved in:
Bibliographic Details
Main Authors: XU, Bowen, AN, Le, THUNG, Ferdian, KHOMH, Foutse, LO, David
Format: text
Language:English
Published: Institutional Knowledge at Singapore Management University 2019
Subjects:
Online Access:https://ink.library.smu.edu.sg/sis_research/4500
https://ink.library.smu.edu.sg/context/sis_research/article/5503/viewcontent/WhyReinventingTheWheelsAnEmpir__1_.pdf
Tags: Add Tag
No Tags, Be the first to tag this record!
Institution: Singapore Management University
Language: English
id sg-smu-ink.sis_research-5503
record_format dspace
spelling sg-smu-ink.sis_research-55032020-03-10T04:37:56Z Why reinventing the wheels? An empirical study on library reuse and re-implementation XU, Bowen AN, Le THUNG, Ferdian KHOMH, Foutse LO, David Nowadays, with the rapid growth of open source software (OSS), library reuse becomes more and more popular since a large amount of third- party libraries are available to download and reuse. A deeper understanding on why developers reuse a library (i.e., replacing self-implemented code with an external library) or re-implement a library (i.e., replacing an imported external library with self-implemented code) could help researchers better understand the factors that developers are concerned with when reusing code. This understanding can then be used to improve existing libraries and API recommendation tools for researchers and practitioners by using the developers concerns identified in this study as design criteria. In this work, we investigated the reasons behind library reuse and re-implementation. To achieve this goal, we first crawled data from two popular sources, F-Droid and GitHub. Then, potential instances of library reuse and re-implementation were found automatically based on certain heuristics. Next, for each instance, we further manually identified whether it is valid or not. For library re-implementation, we obtained 82 instances which are distributed in 75 repositories. We then conducted two types of surveys (i.e., individual survey to corresponding developers of the validated instances and another open survey) for library reuse and re-implementation. For library reuse individual survey, we received 36 responses out of 139 contacted developers. For re-implementation individual survey, we received 13 responses out of 71 contacted developers. In addition, we received 56 responses from the open survey. Finally, we perform qualitative and quantitative analysis on the survey responses and commit logs of the validated instances. The results suggest that library reuse occurs mainly because developers were initially unaware of the library or the library had not been introduced. Re-implementation occurs mainly because the used library method is only a small part of the library, the library dependencies are too complicated, or the library method is deprecated. Finally, based on all findings obtained from analyzing the surveys and commit messages, we provided a few suggestions to improve the current library recommendation systems: tailored recommendation according to users’ preferences, detection of external code that is similar to a part of the users’ code (to avoid duplication or re-implementation), grouping similar recommendations for developers to compare and select the one they prefer, and disrecommendation of poor-quality libraries. 2019-09-05T07:00:00Z text application/pdf https://ink.library.smu.edu.sg/sis_research/4500 info:doi/10.1007/s10664-019-09771-0 https://ink.library.smu.edu.sg/context/sis_research/article/5503/viewcontent/WhyReinventingTheWheelsAnEmpir__1_.pdf http://creativecommons.org/licenses/by-nc-nd/4.0/ Research Collection School Of Computing and Information Systems eng Institutional Knowledge at Singapore Management University Code reuse Code re-implementation Library recommendation systems Computer and Systems Architecture Databases and Information Systems Software Engineering
institution Singapore Management University
building SMU Libraries
continent Asia
country Singapore
Singapore
content_provider SMU Libraries
collection InK@SMU
language English
topic Code reuse
Code re-implementation
Library recommendation systems
Computer and Systems Architecture
Databases and Information Systems
Software Engineering
spellingShingle Code reuse
Code re-implementation
Library recommendation systems
Computer and Systems Architecture
Databases and Information Systems
Software Engineering
XU, Bowen
AN, Le
THUNG, Ferdian
KHOMH, Foutse
LO, David
Why reinventing the wheels? An empirical study on library reuse and re-implementation
description Nowadays, with the rapid growth of open source software (OSS), library reuse becomes more and more popular since a large amount of third- party libraries are available to download and reuse. A deeper understanding on why developers reuse a library (i.e., replacing self-implemented code with an external library) or re-implement a library (i.e., replacing an imported external library with self-implemented code) could help researchers better understand the factors that developers are concerned with when reusing code. This understanding can then be used to improve existing libraries and API recommendation tools for researchers and practitioners by using the developers concerns identified in this study as design criteria. In this work, we investigated the reasons behind library reuse and re-implementation. To achieve this goal, we first crawled data from two popular sources, F-Droid and GitHub. Then, potential instances of library reuse and re-implementation were found automatically based on certain heuristics. Next, for each instance, we further manually identified whether it is valid or not. For library re-implementation, we obtained 82 instances which are distributed in 75 repositories. We then conducted two types of surveys (i.e., individual survey to corresponding developers of the validated instances and another open survey) for library reuse and re-implementation. For library reuse individual survey, we received 36 responses out of 139 contacted developers. For re-implementation individual survey, we received 13 responses out of 71 contacted developers. In addition, we received 56 responses from the open survey. Finally, we perform qualitative and quantitative analysis on the survey responses and commit logs of the validated instances. The results suggest that library reuse occurs mainly because developers were initially unaware of the library or the library had not been introduced. Re-implementation occurs mainly because the used library method is only a small part of the library, the library dependencies are too complicated, or the library method is deprecated. Finally, based on all findings obtained from analyzing the surveys and commit messages, we provided a few suggestions to improve the current library recommendation systems: tailored recommendation according to users’ preferences, detection of external code that is similar to a part of the users’ code (to avoid duplication or re-implementation), grouping similar recommendations for developers to compare and select the one they prefer, and disrecommendation of poor-quality libraries.
format text
author XU, Bowen
AN, Le
THUNG, Ferdian
KHOMH, Foutse
LO, David
author_facet XU, Bowen
AN, Le
THUNG, Ferdian
KHOMH, Foutse
LO, David
author_sort XU, Bowen
title Why reinventing the wheels? An empirical study on library reuse and re-implementation
title_short Why reinventing the wheels? An empirical study on library reuse and re-implementation
title_full Why reinventing the wheels? An empirical study on library reuse and re-implementation
title_fullStr Why reinventing the wheels? An empirical study on library reuse and re-implementation
title_full_unstemmed Why reinventing the wheels? An empirical study on library reuse and re-implementation
title_sort why reinventing the wheels? an empirical study on library reuse and re-implementation
publisher Institutional Knowledge at Singapore Management University
publishDate 2019
url https://ink.library.smu.edu.sg/sis_research/4500
https://ink.library.smu.edu.sg/context/sis_research/article/5503/viewcontent/WhyReinventingTheWheelsAnEmpir__1_.pdf
_version_ 1770574876319416320