English

Real-Time Toxicity Filtering for Open-Source Code Reviews

Software Engineering 2026-04-13 v1

Abstract

Toxic interactions in open-source software development harm community collaboration. To combat this, we propose ToxiShield, a realtime browser extension that identifies and detoxifies toxic code reviews. The framework comprises three modules: toxicity identification, reasoned multiclass classification, and code review detoxification. Our fine-tuned BERT-based binary classifier achieved a 97% F1-score on 38,761 code review texts. For multiclass classification, Claude 3.5 Sonnet with prompt engineering achieved a 39% MCC and 42% F1 on 1,200 samples. Finally, our fine-tuned Llama 3.2 detoxification model reached 95.27% style transfer accuracy, 97.03% fluency, 67.07% content preservation, and an 84% J-score. Validation with 10 software developers suggests ToxiShield effectively fosters a more inclusive open-source environment.

Keywords

Cite

@article{arxiv.2604.08886,
  title  = {Real-Time Toxicity Filtering for Open-Source Code Reviews},
  author = {Md Awsaf Alam Anindya and Showvik Biswas and Anindya Iqbal and Jaydeb Sarker and Amiangshu Bosu},
  journal= {arXiv preprint arXiv:2604.08886},
  year   = {2026}
}
R2 v1 2026-07-01T12:02:17.151Z