Real-Time Toxicity Filtering for Open-Source Code Reviews

๐Ÿ“… 2026-04-10
๐Ÿ“ˆ Citations: 0
โœจ Influential: 0
๐Ÿ“„ PDF

career value

214K/year
๐Ÿค– AI Summary
This study addresses the prevalence of toxic comments in open-source code review discussions, which undermines collaborative environments. To mitigate this issue, the authors propose ToxiShieldโ€”the first real-time system tailored for detecting and detoxifying harmful remarks in code review contexts. ToxiShield integrates three core components: toxicity identification, multi-category classification, and text detoxification. Methodologically, it leverages a fine-tuned BERT model achieving 97% F1 in binary toxicity detection, prompt engineering with Claude 3.5 Sonnet yielding 42% F1 for multi-class categorization, and a fine-tuned Llama 3.2 model for high-fidelity detoxification, attaining a style-transfer accuracy of 95.27% and a J-score of 84%. Empirical validation by developers demonstrates that ToxiShield significantly enhances community inclusivity and effectively reduces toxicity in practice.

Technology Category

Application Category

๐Ÿ“ 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.
Problem

Research questions and friction points this paper is trying to address.

toxicity filtering
code review
open-source software
real-time detection
toxic interactions
Innovation

Methods, ideas, or system contributions that make the work stand out.

toxicity detection
code review
style transfer
BERT fine-tuning
Llama 3.2
๐Ÿ”Ž Similar Papers
No similar papers found.