Improving Internal Software Reuse in the Context of Contemporary Software Engineering Practices

Sammanfattning: Context: Companies adopt many software reuse practices, such as software product line, reuse verbatim, and systematic reuse, to improve their internal software development and maximize the benefits. Contemporary software engineering (SE) practices, such as microservices and InnerSource, influence internal software reuse.Objective: In this thesis, we aim to improve internal software reuse in the context of contemporary SE practices. To do that, we want to 1) understand the state-of-the-art and the state-of-the-practice of software reuse costs and benefits and the challenges that companies are currently facing and 2) identify interventions to improve internal software reuse. Methods: We conducted a systematic literature review to understand the state-of-the-art of software reuse costs and benefits. We performed two exploratory case studies to understand the state-of-the-practice of software reuse costs and benefits, challenges, and improvement areas in the context of contemporary SE practices.  We performed another follow-up improving case study to investigate the medium-sized case company's readiness of adopting InnerSource for software reuse.Results: Existing literature reported more software reuse benefits than costs. The most reported software reuse benefits are better product quality and improved productivity. Verbatim reuse and systematic reuse result in more reuse benefits. Most of the included primary studies are of moderate quality, with only four having high quality. Practitioners think that software reuse costs in developing reusable assets will be paid off when developers start to reuse them. Challenges in software reuse in the context of contemporary SE practices differ between medium-sized and large-sized companies. Both of the companies perceive that InnerSource can help improve internal software reuse. Asking practitioners about both current and desired InnerSource reuse status helps identify the needed InnerSource improvements, thus helping companies succeed in adopting InnerSource for reuse.  Conclusion: Both existing literature and our two case studies investigating software reuse in the context of contemporary SE practices showed that software reuse improves quality and productivity and has costs in developing and integrating reusable assets. However, the overall benefits outweigh the costs. Both case companies faced challenges in improving their internal reuse, where the most common challenges were about developing and maintaining reusable assets. The results showed that InnerSource helps develop and maintain reusable assets and further improves internal software reuse.