Abstract
While open source software (OSS) communities thrive on collaboration, conflicts such as toxic behavior and discrimination can surface, threatening project sustainability. To address these concerns, many communities have adopted a Code of Conduct (CoC) as a mechanism for governing and moderating members’ behavior. Prior research has explored the motivations behind CoC adoption and their content updates, but it remains unclear how different communities are using and maintaining CoCs over time after initial adoption and how adoption impacts communities. To bridge these gaps, in our study, we compile a large-scale dataset of CoCs along with their change histories from GitHub to quantitatively (1) understand the evolution of CoC content and identify change patterns across different communities, and (2) investigate the potential impact of CoC adoption on community engagement. Our results show that OSS communities with a CoC attract more new contributors in both the short- and long-term. However, CoC adoption also leads to a short-term increase in disengagement among existing contributors, with very limited effects on long-term disengagement. The insights from this study can provide guidance for maintaining CoCs and offer statistically significant evidence of their impact.