  Background: Hackathons have become popular events for teams to collaborate on
projects and develop software prototypes. Most existing research focuses on
activities during an event with limited attention to the evolution of the code
brought to or created during a hackathon. Aim: We aim to understand the
evolution of hackathon-related code, specifically, how much hackathon teams
rely on pre-existing code or how much new code they develop during a hackathon.
Moreover, we aim to understand if and where that code gets reused, and what
factors affect reuse. Method: We collected information about 22,183 hackathon
projects from DEVPOST -- a hackathon database -- and obtained related code
(blobs), authors, and project characteristics from the World of Code. We
investigated if code blobs in hackathon projects were created before, during,
or after an event by identifying the original blob creation date and author,
and also checked if the original author was a hackathon project member. We
tracked code reuse by first identifying all commits containing blobs created
during an event before determining all projects that contain those commits.
Result: While only approximately 9.14% of the code blobs are created during
hackathons, this amount is still significant considering the time and member
constraints of such events. Approximately a third of these code blobs get
reused in other projects. The number of associated technologies and the number
of participants in a project increase reuse probability. Conclusion: Our study
demonstrates to what extent pre-existing code is used and new code is created
during a hackathon and how much of it is reused elsewhere afterwards. Our
findings help to better understand code reuse as a phenomenon and the role of
hackathons in this context and can serve as a starting point for further
studies in this area.
