Assessing the Impact of Code Samples Evolution on Developers’ Questions

  • Gabriel Menezes UFMS
  • Willian Braga UFMS
  • Awdren Fontão UFMS
  • Andre Hora UFMG
  • Bruno Cafeo UFMS


To accelerate the learning process of technical resources by developers, organizations such as Amazon, Google, and Microsoft have been provided and maintained the so-called code samples. Code samples are special software projects made available in public repositories with the main goal of teaching and clarifying developers’ doubts related to the use of frameworks, libraries, or other technical resources. Since code samples are software projects themselves, they change over time. If these changes do not preserve essential characteristics of code samples such as size and code simplicity throughout evolution, they may lose their usefulness and can be another source of questions. We investigated the evolution of code samples as well as whether and how it may raise questions from the developers about the code samples themselves. In this way, we analyzed the evolution of 186 code samples provided by Android, AWS, Azure, Spring Boot, and Spring Cloud, assessing metrics related to the size and complexity of over 15,184 commits. We also explored more than 1,500 developers’ questions in Stack Overflow to understand the relation between these questions and code samples’ evolution. We observed that organizations may not be preserving key characteristics of code samples during evolution. Our analysis also indicates that some untamed metrics are related to a rise of questions about code samples.
Palavras-chave: code samples, stack overflow, software evolution, mining software repositories
Como Citar

Selecione um Formato
MENEZES, Gabriel; BRAGA, Willian; FONTÃO, Awdren; HORA, Andre; CAFEO, Bruno. Assessing the Impact of Code Samples Evolution on Developers’ Questions. In: SIMPÓSIO BRASILEIRO DE ENGENHARIA DE SOFTWARE (SBES), 36. , 2022, Uberlândia. Anais [...]. Porto Alegre: Sociedade Brasileira de Computação, 2022 . p. 321–330.